diff options
Diffstat (limited to 'lib/private/Share20/ProviderFactory.php')
-rw-r--r-- | lib/private/Share20/ProviderFactory.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php index e1a2c9a5375..7335c863df0 100644 --- a/lib/private/Share20/ProviderFactory.php +++ b/lib/private/Share20/ProviderFactory.php @@ -38,8 +38,6 @@ use Psr\Log\LoggerInterface; * @package OC\Share20 */ class ProviderFactory implements IProviderFactory { - /** @var IServerContainer */ - private $serverContainer; /** @var DefaultShareProvider */ private $defaultProvider = null; /** @var FederatedShareProvider */ @@ -62,8 +60,9 @@ class ProviderFactory implements IProviderFactory { * * @param IServerContainer $serverContainer */ - public function __construct(IServerContainer $serverContainer) { - $this->serverContainer = $serverContainer; + public function __construct( + private IServerContainer $serverContainer, + ) { } public function registerProvider(string $shareProviderClass): void { @@ -83,10 +82,10 @@ class ProviderFactory implements IProviderFactory { $this->serverContainer->getGroupManager(), $this->serverContainer->get(IRootFolder::class), $this->serverContainer->get(IMailer::class), - $this->serverContainer->query(Defaults::class), + $this->serverContainer->get(Defaults::class), $this->serverContainer->get(IFactory::class), $this->serverContainer->getURLGenerator(), - $this->serverContainer->query(ITimeFactory::class), + $this->serverContainer->get(ITimeFactory::class), $this->serverContainer->get(LoggerInterface::class), $this->serverContainer->get(IManager::class), ); @@ -122,11 +121,11 @@ class ProviderFactory implements IProviderFactory { $notifications = new Notifications( $addressHandler, $this->serverContainer->get(IClientService::class), - $this->serverContainer->query(\OCP\OCS\IDiscoveryService::class), + $this->serverContainer->get(\OCP\OCS\IDiscoveryService::class), $this->serverContainer->getJobList(), \OC::$server->getCloudFederationProviderManager(), \OC::$server->get(ICloudFederationFactory::class), - $this->serverContainer->query(IEventDispatcher::class), + $this->serverContainer->get(IEventDispatcher::class), $this->serverContainer->get(LoggerInterface::class), ); $tokenHandler = new TokenHandler( @@ -181,7 +180,7 @@ class ProviderFactory implements IProviderFactory { $this->serverContainer->getURLGenerator(), $this->serverContainer->getActivityManager(), $settingsManager, - $this->serverContainer->query(Defaults::class), + $this->serverContainer->get(Defaults::class), $this->serverContainer->get(IHasher::class), $this->serverContainer->get(IEventDispatcher::class), $this->serverContainer->get(IManager::class) @@ -218,7 +217,7 @@ class ProviderFactory implements IProviderFactory { $this->serverContainer->getUserManager(), $this->serverContainer->get(IRootFolder::class), $this->serverContainer->getL10N('circles'), - $this->serverContainer->getLogger(), + $this->serverContainer->get(LoggerInterface::class), $this->serverContainer->getURLGenerator() ); } |