summaryrefslogtreecommitdiffstats
path: root/core/Command/App
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-06-26 14:54:51 +0200
committerJoas Schilling <coding@schilljs.com>2020-06-26 14:54:51 +0200
commitab21d69903c4360cbce59741624b6e765e3bd35f (patch)
tree8bed2d6af0d4bfef3766e356acc570b93eb9feb3 /core/Command/App
parented4afa55c1ccaef140ac310258ad837bf6af9557 (diff)
downloadnextcloud-server-ab21d69903c4360cbce59741624b6e765e3bd35f.tar.gz
nextcloud-server-ab21d69903c4360cbce59741624b6e765e3bd35f.zip
Add return value to all commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/Command/App')
-rw-r--r--core/Command/App/CheckCode.php2
-rw-r--r--core/Command/App/Disable.php2
-rw-r--r--core/Command/App/Enable.php2
-rw-r--r--core/Command/App/GetPath.php2
-rw-r--r--core/Command/App/Install.php2
-rw-r--r--core/Command/App/ListApps.php3
-rw-r--r--core/Command/App/Remove.php2
-rw-r--r--core/Command/App/Update.php2
8 files changed, 9 insertions, 8 deletions
diff --git a/core/Command/App/CheckCode.php b/core/Command/App/CheckCode.php
index 25e22d04171..f7b3723a8d3 100644
--- a/core/Command/App/CheckCode.php
+++ b/core/Command/App/CheckCode.php
@@ -80,7 +80,7 @@ class CheckCode extends Command implements CompletionAwareInterface {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$appId = $input->getArgument('app-id');
$checkList = new EmptyCheck();
diff --git a/core/Command/App/Disable.php b/core/Command/App/Disable.php
index 94dd1f63541..ba9b8d769e5 100644
--- a/core/Command/App/Disable.php
+++ b/core/Command/App/Disable.php
@@ -60,7 +60,7 @@ class Disable extends Command implements CompletionAwareInterface {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$appIds = $input->getArgument('app-id');
foreach ($appIds as $appId) {
diff --git a/core/Command/App/Enable.php b/core/Command/App/Enable.php
index e782a7fc0be..2e26184b199 100644
--- a/core/Command/App/Enable.php
+++ b/core/Command/App/Enable.php
@@ -83,7 +83,7 @@ class Enable extends Command implements CompletionAwareInterface {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$appIds = $input->getArgument('app-id');
$groups = $this->resolveGroupIds($input->getOption('groups'));
$forceEnable = (bool) $input->getOption('force');
diff --git a/core/Command/App/GetPath.php b/core/Command/App/GetPath.php
index 07a8a38bbc5..1659a110ab0 100644
--- a/core/Command/App/GetPath.php
+++ b/core/Command/App/GetPath.php
@@ -51,7 +51,7 @@ class GetPath extends Base {
* @param OutputInterface $output An OutputInterface instance
* @return null|int null or 0 if everything went fine, or an error code
*/
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$appName = $input->getArgument('app');
$path = \OC_App::getAppPath($appName);
if ($path !== false) {
diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php
index 65817894955..41e3e20c9dc 100644
--- a/core/Command/App/Install.php
+++ b/core/Command/App/Install.php
@@ -51,7 +51,7 @@ class Install extends Command {
;
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$appId = $input->getArgument('app-id');
if (\OC_App::getAppPath($appId)) {
diff --git a/core/Command/App/ListApps.php b/core/Command/App/ListApps.php
index 0765ab39a24..74f2ad76ccd 100644
--- a/core/Command/App/ListApps.php
+++ b/core/Command/App/ListApps.php
@@ -61,7 +61,7 @@ class ListApps extends Base {
;
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false') {
$shippedFilter = $input->getOption('shipped') === 'true';
} else {
@@ -97,6 +97,7 @@ class ListApps extends Base {
}
$this->writeAppList($input, $output, $apps);
+ return 0;
}
/**
diff --git a/core/Command/App/Remove.php b/core/Command/App/Remove.php
index 6e3fa704ef1..96d1efe8c62 100644
--- a/core/Command/App/Remove.php
+++ b/core/Command/App/Remove.php
@@ -75,7 +75,7 @@ class Remove extends Command implements CompletionAwareInterface {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$appId = $input->getArgument('app-id');
// Check if the app is installed
diff --git a/core/Command/App/Update.php b/core/Command/App/Update.php
index 417d1915d05..34178c1ee7c 100644
--- a/core/Command/App/Update.php
+++ b/core/Command/App/Update.php
@@ -80,7 +80,7 @@ class Update extends Command {
;
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$singleAppId = $input->getArgument('app-id');
if ($singleAppId) {