From 19b039e6e0d4f3955758e001d62c93aca90424d3 Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Wed, 19 Jul 2017 20:32:54 +0200
Subject: [files_external] fix commands

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
---
 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(-)

(limited to 'apps/files_external')

diff --git a/apps/files_external/lib/Command/Applicable.php b/apps/files_external/lib/Command/Applicable.php
index c7c2f6aa216..2e8311db9ec 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 d5b320dcfc2..ff9fa3ae878 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('<info>Storage created with id ' . $mount->getId() . '</info>');
 			} 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 d63aa35050c..015995ec14f 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 2159c0a001e..96afc86ba2c 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 fc1f2bf6c5a..a9618854b34 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 6bb56373d33..3c5c3af9ac2 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',
 				'/'
-- 
cgit v1.2.3