-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Refactor lib/private #39249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor lib/private #39249
Conversation
|
Could you please resolve the conflicts? |
Signed-off-by: Hamid Dehnavi <[email protected]>
Signed-off-by: Hamid Dehnavi <[email protected]>
083a390 to
f837b57
Compare
be88bf5 to
c3ca53f
Compare
c3ca53f to
876fbbe
Compare
Signed-off-by: John Molakvoæ <[email protected]>
876fbbe to
98ef21f
Compare
| * @return array|null | ||
| */ | ||
| protected function getEnabledDefaultProvider() { | ||
| protected function getEnabledDefaultProvider(): ?array { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| protected function getEnabledDefaultProvider(): ?array { | |
| protected function getEnabledDefaultProvider(): array { |
I do not see where it returns null?
Docblock @return should be reverted to array as well or removed.
| private SystemConfig $config; | ||
|
|
||
| private IEventLogger $eventLogger; | ||
| private \Redis|\RedisCluster $instance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot work because the property is not instanciated in constructor.
Most likely should be changed to:
| private \Redis|\RedisCluster $instance; | |
| private \Redis|\RedisCluster|null $instance; |
And then the class should be adapted so that psalm is happy. The create method is used for creating the object.
The instanceof test in getInstance looks wrong as it does not test cluster.
| * @deprecated 20.0.0 | ||
| */ | ||
| public function getCalendarManager() { | ||
| public function getCalendarManager(): \OCP\Calendar\IManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it makes sense to strong type these obsolete methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deprecated since 20 means we can even remove it when not actively used in shipped apps or server :P
| * @deprecated 20.0.0 | ||
| */ | ||
| public function getBruteForceThrottler() { | ||
| public function getBruteForceThrottler(): Throttler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public function getBruteForceThrottler(): Throttler { | |
| public function getBruteForceThrottler(): IThrottler { |
Summary
The required adjustments have been made to the following classes under
/lib/privatenamespace:PreviewManager.phpRepair.phpRedisFactory.phpSearch.phpServer.phpServerContainer.phpThe improvements:
if (isset(...))to null coalescing operatorChecklist