-
Notifications
You must be signed in to change notification settings - Fork 56
Add rector and apply it #1995
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
Add rector and apply it #1995
Conversation
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Those are easily fixable with rector :) |
| $this->userManager = $userManager; | ||
| $this->rootFolder = $rootFolder; | ||
| $this->l10n = $l10n; | ||
| $this->logger = OC::$server->get(LoggerInterface::class); | ||
| $this->logger = Server::get(LoggerInterface::class); | ||
| $this->urlGenerator = $urlGenerator; | ||
|
|
||
| $this->federatedUserService = OC::$server->get(FederatedUserService::class); | ||
| $this->federatedEventService = OC::$server->get(FederatedEventService::class); | ||
| $this->shareWrapperService = OC::$server->get(ShareWrapperService::class); | ||
| $this->shareTokenService = OC::$server->get(ShareTokenService::class); | ||
| $this->circleService = OC::$server->get(CircleService::class); | ||
| $this->eventService = OC::$server->get(EventService::class); | ||
| $this->federatedUserService = Server::get(FederatedUserService::class); | ||
| $this->federatedEventService = Server::get(FederatedEventService::class); | ||
| $this->shareWrapperService = Server::get(ShareWrapperService::class); | ||
| $this->shareTokenService = Server::get(ShareTokenService::class); | ||
| $this->circleService = Server::get(CircleService::class); | ||
| $this->eventService = Server::get(EventService::class); |
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.
Should all be promoted properties from DI.
| public function __construct() { | ||
| parent::__construct( | ||
| OC::$server->get(IDBConnection::class), | ||
| OC::$server->get(SystemConfig::class), | ||
| OC::$server->get(LoggerInterface::class) | ||
| Server::get(IDBConnection::class), | ||
| Server::get(SystemConfig::class), | ||
| Server::get(LoggerInterface::class) | ||
| ); | ||
| } |
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.
Why?
Let’s remove this constructor?
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
|
The rest can be in follow-ups |
The diff is not that huge.
A few things could be improved, there are useless
@varannotations, and also weird constructors intead of proper DI usage.