aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Command/RetentionCleanupCommand.php
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-07-05 17:45:43 +0330
committerFaraz Samapoor <fsa@adlas.at>2023-09-20 15:43:15 +0330
commitd13874fdf403dc82ca8734b8d8bf9ec77bafc452 (patch)
tree57cc904a17dc34dc454f02c95527080025d6546c /apps/dav/lib/Command/RetentionCleanupCommand.php
parent6714e51b0ce25fe5d9223279a9484abd8c00f85e (diff)
downloadnextcloud-server-d13874fdf403dc82ca8734b8d8bf9ec77bafc452.tar.gz
nextcloud-server-d13874fdf403dc82ca8734b8d8bf9ec77bafc452.zip
Refactors dav app commands.
To improve code readability. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'apps/dav/lib/Command/RetentionCleanupCommand.php')
-rw-r--r--apps/dav/lib/Command/RetentionCleanupCommand.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/dav/lib/Command/RetentionCleanupCommand.php b/apps/dav/lib/Command/RetentionCleanupCommand.php
index c9beabc974a..21eb96c235c 100644
--- a/apps/dav/lib/Command/RetentionCleanupCommand.php
+++ b/apps/dav/lib/Command/RetentionCleanupCommand.php
@@ -31,18 +31,15 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class RetentionCleanupCommand extends Command {
- /** @var RetentionService */
- private $service;
-
- public function __construct(RetentionService $service) {
+ public function __construct(
+ private RetentionService $service,
+ ) {
parent::__construct('dav:retention:clean-up');
-
- $this->service = $service;
}
protected function execute(InputInterface $input, OutputInterface $output): int {
$this->service->cleanUp();
- return 0;
+ return self::SUCCESS;
}
}