From c0436c367b3e06ae4e4fdc9b9440826fa34e3428 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 26 Mar 2021 15:51:07 +0100 Subject: [PATCH] fix some types Signed-off-by: Robin Appelman --- apps/files_external/lib/AppInfo/Application.php | 8 +------- apps/files_external/lib/Command/Create.php | 2 +- apps/files_external/lib/Command/Import.php | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php index 61929a82a4..051a04a1f3 100644 --- a/apps/files_external/lib/AppInfo/Application.php +++ b/apps/files_external/lib/AppInfo/Application.php @@ -34,7 +34,6 @@ use OCA\Files_External\Config\ConfigAdapter; use OCA\Files_External\Config\UserPlaceholderHandler; use OCA\Files_External\Listener\GroupDeletedListener; use OCA\Files_External\Listener\UserDeletedListener; -use OCA\Files_External\Service\DBConfigService; use OCA\Files_External\Lib\Auth\AmazonS3\AccessKey; use OCA\Files_External\Lib\Auth\Builtin; use OCA\Files_External\Lib\Auth\NullMechanism; @@ -71,12 +70,7 @@ use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\Files\Config\IMountProviderCollection; use OCP\Group\Events\GroupDeletedEvent; -use OCP\IGroup; -use OCP\IUser; use OCP\User\Events\UserDeletedEvent; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\GenericEvent; -use function foo\func; require_once __DIR__ . '/../../3rdparty/autoload.php'; @@ -113,7 +107,7 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide 'name' => $l->t('External storages'), ]; }); - $context->injectFn(function(BackendService $backendService, UserPlaceholderHandler $userConfigHandler) { + $context->injectFn(function (BackendService $backendService, UserPlaceholderHandler $userConfigHandler) { $backendService->registerBackendProvider($this); $backendService->registerAuthMechanismProvider($this); $backendService->registerConfigHandler('user', function () use ($userConfigHandler) { diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php index 2eb0865b3f..da3a2c987d 100644 --- a/apps/files_external/lib/Command/Create.php +++ b/apps/files_external/lib/Command/Create.php @@ -120,7 +120,7 @@ class Create extends Base { } protected function execute(InputInterface $input, OutputInterface $output): int { - $user = $input->getOption('user'); + $user = (string) $input->getOption('user'); $mountPoint = $input->getArgument('mount_point'); $storageIdentifier = $input->getArgument('storage_backend'); $authIdentifier = $input->getArgument('authentication_backend'); diff --git a/apps/files_external/lib/Command/Import.php b/apps/files_external/lib/Command/Import.php index bbaeea91c3..d4c94fe35c 100644 --- a/apps/files_external/lib/Command/Import.php +++ b/apps/files_external/lib/Command/Import.php @@ -108,7 +108,7 @@ class Import extends Base { } protected function execute(InputInterface $input, OutputInterface $output): int { - $user = $input->getOption('user'); + $user = (string) $input->getOption('user'); $path = $input->getArgument('path'); if ($path === '-') { $json = file_get_contents('php://stdin');