Uh oh!
There was an error while loading. Please reload this page.
Refactor lib/private - #39249
Conversation
Uh oh!
There was an error while loading. Please reload this page.
fsamapoor
commented
Aug 14, 2023
Could you please resolve the conflicts? |
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
083a390 to
f837b57Comparebe88bf5 to
c3ca53fComparec3ca53f to
876fbbeCompareSigned-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
876fbbe to
98ef21fCompare| * @return array|null | ||
| */ | ||
| protected function getEnabledDefaultProvider() { | ||
| protected function getEnabledDefaultProvider(): ?array { |
There was a problem hiding this comment.
| protectedfunction getEnabledDefaultProvider(): ?array { | |
| protectedfunction 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.
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.
Not sure it makes sense to strong type these obsolete methods.
There was a problem hiding this comment.
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.
| publicfunction getBruteForceThrottler(): Throttler { | |
| publicfunction 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