aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Migration/ChunkCleanup.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Migration/ChunkCleanup.php')
-rw-r--r--apps/dav/lib/Migration/ChunkCleanup.php26
1 files changed, 8 insertions, 18 deletions
diff --git a/apps/dav/lib/Migration/ChunkCleanup.php b/apps/dav/lib/Migration/ChunkCleanup.php
index b4d5f48897e..edd9a26109e 100644
--- a/apps/dav/lib/Migration/ChunkCleanup.php
+++ b/apps/dav/lib/Migration/ChunkCleanup.php
@@ -21,23 +21,12 @@ use OCP\Migration\IRepairStep;
class ChunkCleanup implements IRepairStep {
- /** @var IConfig */
- private $config;
- /** @var IUserManager */
- private $userManager;
- /** @var IRootFolder */
- private $rootFolder;
- /** @var IJobList */
- private $jobList;
-
- public function __construct(IConfig $config,
- IUserManager $userManager,
- IRootFolder $rootFolder,
- IJobList $jobList) {
- $this->config = $config;
- $this->userManager = $userManager;
- $this->rootFolder = $rootFolder;
- $this->jobList = $jobList;
+ public function __construct(
+ private IConfig $config,
+ private IUserManager $userManager,
+ private IRootFolder $rootFolder,
+ private IJobList $jobList,
+ ) {
}
public function getName(): string {
@@ -48,11 +37,12 @@ class ChunkCleanup implements IRepairStep {
// If we already ran this onec there is no need to run it again
if ($this->config->getAppValue('dav', 'chunks_migrated', '0') === '1') {
$output->info('Cleanup not required');
+ return;
}
$output->startProgress();
// Loop over all seen users
- $this->userManager->callForSeenUsers(function (IUser $user) use ($output) {
+ $this->userManager->callForSeenUsers(function (IUser $user) use ($output): void {
try {
$userFolder = $this->rootFolder->getUserFolder($user->getUID());
$userRoot = $userFolder->getParent();