diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-06-13 12:48:35 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-07-28 16:53:24 +0200 |
commit | 2ee659e54787c938e57787261442ad4037270322 (patch) | |
tree | ddc2a94bb966c5790bf14eb31ecc1d73d20fc951 /apps/files_sharing/lib/AppInfo/Application.php | |
parent | 2fb7a1feebb6b8a2c524c75e688cec00d4e3d50e (diff) | |
download | nextcloud-server-2ee659e54787c938e57787261442ad4037270322.tar.gz nextcloud-server-2ee659e54787c938e57787261442ad4037270322.zip |
Fix view-only code after code review comments
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_sharing/lib/AppInfo/Application.php')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index fef579a11c0..451d6b6557a 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -125,12 +125,12 @@ class Application extends App implements IBootstrap { } - public function registerMountProviders(IMountProviderCollection $mountProviderCollection, MountProvider $mountProvider, ExternalMountProvider $externalMountProvider) { + public function registerMountProviders(IMountProviderCollection $mountProviderCollection, MountProvider $mountProvider, ExternalMountProvider $externalMountProvider): void { $mountProviderCollection->registerProvider($mountProvider); $mountProviderCollection->registerProvider($externalMountProvider); } - public function registerEventsScripts(IEventDispatcher $dispatcher, EventDispatcherInterface $oldDispatcher) { + public function registerEventsScripts(IEventDispatcher $dispatcher, EventDispatcherInterface $oldDispatcher): void { // sidebar and files scripts $dispatcher->addServiceListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class); $dispatcher->addServiceListener(BeforeTemplateRenderedEvent::class, LegacyBeforeTemplateRenderedListener::class); @@ -159,12 +159,12 @@ class Application extends App implements IBootstrap { IEventDispatcher $dispatcher, ?IUserSession $userSession, IRootFolder $rootFolder - ) { + ): void { $dispatcher->addListener( 'file.beforeGetDirect', function (GenericEvent $event) use ($userSession, $rootFolder) { - $pathsToCheck[] = $event->getArgument('path'); + $pathsToCheck = [$event->getArgument('path')]; // Check only for user/group shares. Don't restrict e.g. share links if ($userSession && $userSession->isLoggedIn()) { @@ -213,7 +213,7 @@ class Application extends App implements IBootstrap { ); } - public function setupSharingMenus(IManager $shareManager, IFactory $l10nFactory, IUserSession $userSession) { + public function setupSharingMenus(IManager $shareManager, IFactory $l10nFactory, IUserSession $userSession): void { if (!$shareManager->shareApiEnabled() || !class_exists('\OCA\Files\App')) { return; } |