aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Command/DeleteOrphanedFiles.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib/Command/DeleteOrphanedFiles.php')
-rw-r--r--apps/files/lib/Command/DeleteOrphanedFiles.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/apps/files/lib/Command/DeleteOrphanedFiles.php b/apps/files/lib/Command/DeleteOrphanedFiles.php
index e3305fe3b9b..4b7179271f5 100644
--- a/apps/files/lib/Command/DeleteOrphanedFiles.php
+++ b/apps/files/lib/Command/DeleteOrphanedFiles.php
@@ -35,17 +35,13 @@ use Symfony\Component\Console\Output\OutputInterface;
class DeleteOrphanedFiles extends Command {
public const CHUNK_SIZE = 200;
- /**
- * @var IDBConnection
- */
- protected $connection;
-
- public function __construct(IDBConnection $connection) {
- $this->connection = $connection;
+ public function __construct(
+ protected IDBConnection $connection,
+ ) {
parent::__construct();
}
- protected function configure() {
+ protected function configure(): void {
$this
->setName('files:cleanup')
->setDescription('cleanup filecache');
@@ -81,10 +77,10 @@ class DeleteOrphanedFiles extends Command {
$deletedMounts = $this->cleanupOrphanedMounts();
$output->writeln("$deletedMounts orphaned mount entries deleted");
- return 0;
+ return self::SUCCESS;
}
- private function cleanupOrphanedMounts() {
+ private function cleanupOrphanedMounts(): int {
$deletedEntries = 0;
$query = $this->connection->getQueryBuilder();