From 2ee659e54787c938e57787261442ad4037270322 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 13 Jun 2022 12:48:35 +0200 Subject: Fix view-only code after code review comments Signed-off-by: Vincent Petry --- apps/files_sharing/lib/AppInfo/Application.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/files_sharing/lib/AppInfo/Application.php') 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; } -- cgit v1.2.3