summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Command/Create.php
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-10-18 12:22:40 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-10-18 12:28:34 +0200
commit732badf552c91733192e87d6ceb2848b4b75d439 (patch)
tree79003c742613b0794210a2ff17973efd32ba64b3 /apps/files_external/lib/Command/Create.php
parent94a0b270005ef95ccfbbe486fc7e37ac225e5afb (diff)
downloadnextcloud-server-732badf552c91733192e87d6ceb2848b4b75d439.tar.gz
nextcloud-server-732badf552c91733192e87d6ceb2848b4b75d439.zip
Additional type hinting found by psalm
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_external/lib/Command/Create.php')
-rw-r--r--apps/files_external/lib/Command/Create.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php
index 372fa4ef372..17e4731a2d6 100644
--- a/apps/files_external/lib/Command/Create.php
+++ b/apps/files_external/lib/Command/Create.php
@@ -34,6 +34,7 @@ use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\BackendService;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\UserStoragesService;
+use OCA\Files_External\Service\StoragesService;
use OCP\IUserManager;
use OCP\IUserSession;
use Symfony\Component\Console\Input\ArrayInput;
@@ -104,7 +105,7 @@ class Create extends Base {
}
protected function execute(InputInterface $input, OutputInterface $output): int {
- $user = (string) $input->getOption('user');
+ $user = (string)$input->getOption('user');
$mountPoint = $input->getArgument('mount_point');
$storageIdentifier = $input->getArgument('storage_backend');
$authIdentifier = $input->getArgument('authentication_backend');
@@ -172,7 +173,7 @@ class Create extends Base {
return 0;
}
- private function validateParam($key, &$value, Backend $storageBackend, AuthMechanism $authBackend): bool {
+ private function validateParam(string $key, &$value, Backend $storageBackend, AuthMechanism $authBackend): bool {
$params = array_merge($storageBackend->getParameters(), $authBackend->getParameters());
foreach ($params as $param) {
/** @var DefinitionParameter $param */
@@ -186,7 +187,7 @@ class Create extends Base {
return false;
}
- private function showMount($user, StorageConfig $mount, InputInterface $input, OutputInterface $output): void {
+ private function showMount(string $user, StorageConfig $mount, InputInterface $input, OutputInterface $output): void {
$listCommand = new ListCommand($this->globalService, $this->userService, $this->userSession, $this->userManager);
$listInput = new ArrayInput([], $listCommand->getDefinition());
$listInput->setOption('output', $input->getOption('output'));
@@ -194,7 +195,7 @@ class Create extends Base {
$listCommand->listMounts($user, [$mount], $listInput, $output);
}
- protected function getStorageService(string $userId) {
+ protected function getStorageService(string $userId): StoragesService {
if (!empty($userId)) {
$user = $this->userManager->get($userId);
if (is_null($user)) {