-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
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
*/ | ||
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.
@@ -1446,23 +1445,23 @@ public function boot() { | |||
* @return \OCP\Calendar\IManager | |||
* @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
return $this->get(CsrfTokenManager::class); | ||
} | ||
|
||
/** | ||
* @return IThrottler | ||
* @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/private
namespace:PreviewManager.php
Repair.php
RedisFactory.php
Search.php
Server.php
ServerContainer.php
The improvements:
if (isset(...))
to null coalescing operatorChecklist