From 19b039e6e0d4f3955758e001d62c93aca90424d3 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 19 Jul 2017 20:32:54 +0200 Subject: [PATCH] [files_external] fix commands Signed-off-by: Roeland Jago Douma --- apps/files_external/lib/Command/Applicable.php | 10 +++++----- apps/files_external/lib/Command/Create.php | 6 +++--- apps/files_external/lib/Command/Delete.php | 2 +- apps/files_external/lib/Command/Import.php | 4 ++-- apps/files_external/lib/Command/ListCommand.php | 2 +- apps/files_external/lib/Command/Notify.php | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/files_external/lib/Command/Applicable.php b/apps/files_external/lib/Command/Applicable.php index c7c2f6aa21..2e8311db9e 100644 --- a/apps/files_external/lib/Command/Applicable.php +++ b/apps/files_external/lib/Command/Applicable.php @@ -71,27 +71,27 @@ class Applicable extends Base { 'The id of the mount to edit' )->addOption( 'add-user', - null, + '', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'user to add as applicable' )->addOption( 'remove-user', - null, + '', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'user to remove as applicable' )->addOption( 'add-group', - null, + '', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'group to add as applicable' )->addOption( 'remove-group', - null, + '', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'group to remove as applicable' )->addOption( 'remove-all', - null, + '', InputOption::VALUE_NONE, 'Set the mount to be globally applicable' ); diff --git a/apps/files_external/lib/Command/Create.php b/apps/files_external/lib/Command/Create.php index d5b320dcfc..ff9fa3ae87 100644 --- a/apps/files_external/lib/Command/Create.php +++ b/apps/files_external/lib/Command/Create.php @@ -83,7 +83,7 @@ class Create extends Base { ->setDescription('Create a new mount configuration') ->addOption( 'user', - null, + '', InputOption::VALUE_OPTIONAL, 'user to add the mount configuration for, if not set the mount will be added as system mount' ) @@ -110,7 +110,7 @@ class Create extends Base { ) ->addOption( 'dry', - null, + '', InputOption::VALUE_NONE, 'Don\'t save the created mount, only list the new mount' ); @@ -180,7 +180,7 @@ class Create extends Base { if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { $output->writeln('Storage created with id ' . $mount->getId() . ''); } else { - $output->writeln($mount->getId()); + $output->writeln((string)$mount->getId()); } } return 0; diff --git a/apps/files_external/lib/Command/Delete.php b/apps/files_external/lib/Command/Delete.php index d63aa35050..015995ec14 100644 --- a/apps/files_external/lib/Command/Delete.php +++ b/apps/files_external/lib/Command/Delete.php @@ -103,7 +103,7 @@ class Delete extends Base { $question = new ConfirmationQuestion('Delete this mount? [y/N] ', false); if (!$questionHelper->ask($input, $output, $question)) { - return; + return null; } } diff --git a/apps/files_external/lib/Command/Import.php b/apps/files_external/lib/Command/Import.php index 2159c0a001..96afc86ba2 100644 --- a/apps/files_external/lib/Command/Import.php +++ b/apps/files_external/lib/Command/Import.php @@ -87,7 +87,7 @@ class Import extends Base { ->setDescription('Import mount configurations') ->addOption( 'user', - null, + '', InputOption::VALUE_OPTIONAL, 'user to add the mount configurations for, if not set the mount will be added as system mount' ) @@ -98,7 +98,7 @@ class Import extends Base { ) ->addOption( 'dry', - null, + '', InputOption::VALUE_NONE, 'Don\'t save the imported mounts, only list the new mounts' ); diff --git a/apps/files_external/lib/Command/ListCommand.php b/apps/files_external/lib/Command/ListCommand.php index fc1f2bf6c5..a9618854b3 100644 --- a/apps/files_external/lib/Command/ListCommand.php +++ b/apps/files_external/lib/Command/ListCommand.php @@ -77,7 +77,7 @@ class ListCommand extends Base { 'user id to list the personal mounts for, if no user is provided admin mounts will be listed' )->addOption( 'show-password', - null, + '', InputOption::VALUE_NONE, 'show passwords and secrets' )->addOption( diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php index 6bb56373d3..3c5c3af9ac 100644 --- a/apps/files_external/lib/Command/Notify.php +++ b/apps/files_external/lib/Command/Notify.php @@ -79,7 +79,7 @@ class Notify extends Base { 'The password for the remote mount (required only for some mount configuration that don\'t store credentials)' )->addOption( 'path', - null, + '', InputOption::VALUE_REQUIRED, 'The directory in the storage to listen for updates in', '/'