aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib/Command/ExpireVersions.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_versions/lib/Command/ExpireVersions.php')
-rw-r--r--apps/files_versions/lib/Command/ExpireVersions.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_versions/lib/Command/ExpireVersions.php b/apps/files_versions/lib/Command/ExpireVersions.php
index a48908dcd6b..e3b444e8f46 100644
--- a/apps/files_versions/lib/Command/ExpireVersions.php
+++ b/apps/files_versions/lib/Command/ExpireVersions.php
@@ -41,7 +41,7 @@ class ExpireVersions extends Command {
* @var Expiration
*/
private $expiration;
-
+
/**
* @var IUserManager
*/
@@ -70,7 +70,7 @@ class ExpireVersions extends Command {
);
}
- protected function execute(InputInterface $input, OutputInterface $output) {
+ protected function execute(InputInterface $input, OutputInterface $output): int {
$maxAge = $this->expiration->getMaxAgeAsTimestamp();
if (!$maxAge) {
$output->writeln("No expiry configured.");
@@ -86,6 +86,7 @@ class ExpireVersions extends Command {
$this->expireVersionsForUser($userObject);
} else {
$output->writeln("<error>Unknown user $user</error>");
+ return 1;
}
}
} else {
@@ -98,6 +99,7 @@ class ExpireVersions extends Command {
$p->finish();
$output->writeln('');
}
+ return 0;
}
public function expireVersionsForUser(IUser $user) {