From d7c0b9cced2dff16e4e05507ac58cf8664a6aafc Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 26 Jun 2020 15:12:11 +0200 Subject: Also always return in app commands Signed-off-by: Joas Schilling --- apps/files_versions/lib/Command/CleanUp.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/files_versions/lib/Command/CleanUp.php') diff --git a/apps/files_versions/lib/Command/CleanUp.php b/apps/files_versions/lib/Command/CleanUp.php index d49835f2db4..d67df024a1b 100644 --- a/apps/files_versions/lib/Command/CleanUp.php +++ b/apps/files_versions/lib/Command/CleanUp.php @@ -61,7 +61,7 @@ class CleanUp extends Command { } - protected function execute(InputInterface $input, OutputInterface $output) { + protected function execute(InputInterface $input, OutputInterface $output): int { $users = $input->getArgument('user_id'); if (!empty($users)) { foreach ($users as $user) { @@ -70,6 +70,7 @@ class CleanUp extends Command { $this->deleteVersions($user); } else { $output->writeln("Unknown user $user"); + return 1; } } } else { @@ -95,6 +96,7 @@ class CleanUp extends Command { } while (count($users) >= $limit); } } + return 0; } -- cgit v1.2.3