aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-09-20 17:38:36 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-09-20 17:51:00 +0200
commit1a4978c4ead55daa2726df5967c1377d61a57f7a (patch)
tree88c8a82ed52b8698be9e0cd4e9cef29b3c0d8ea1 /apps/files_trashbin
parent6db9cbfdeb7dd475a258c1c2f2c163c41856d6c2 (diff)
downloadnextcloud-server-1a4978c4ead55daa2726df5967c1377d61a57f7a.tar.gz
nextcloud-server-1a4978c4ead55daa2726df5967c1377d61a57f7a.zip
chore: Apply rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php2
-rw-r--r--apps/files_trashbin/lib/Command/ExpireTrash.php2
-rw-r--r--apps/files_trashbin/lib/Command/Size.php2
-rw-r--r--apps/files_trashbin/tests/Command/CleanUpTest.php4
4 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
index 18172560893..651f5035c1c 100644
--- a/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
+++ b/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php
@@ -50,7 +50,7 @@ class ExpireTrash extends TimedJob {
return;
}
- $this->userManager->callForSeenUsers(function (IUser $user) {
+ $this->userManager->callForSeenUsers(function (IUser $user): void {
$uid = $user->getUID();
if (!$this->setupFS($uid)) {
return;
diff --git a/apps/files_trashbin/lib/Command/ExpireTrash.php b/apps/files_trashbin/lib/Command/ExpireTrash.php
index 2c2d9d58539..33a5ac83dbf 100644
--- a/apps/files_trashbin/lib/Command/ExpireTrash.php
+++ b/apps/files_trashbin/lib/Command/ExpireTrash.php
@@ -74,7 +74,7 @@ class ExpireTrash extends Command {
} else {
$p = new ProgressBar($output);
$p->start();
- $this->userManager->callForSeenUsers(function (IUser $user) use ($p) {
+ $this->userManager->callForSeenUsers(function (IUser $user) use ($p): void {
$p->advance();
$this->expireTrashForUser($user);
});
diff --git a/apps/files_trashbin/lib/Command/Size.php b/apps/files_trashbin/lib/Command/Size.php
index 81ae82c02d3..60b1f0981fa 100644
--- a/apps/files_trashbin/lib/Command/Size.php
+++ b/apps/files_trashbin/lib/Command/Size.php
@@ -103,7 +103,7 @@ class Size extends Base {
}
} else {
$users = [];
- $this->userManager->callForSeenUsers(function (IUser $user) use (&$users) {
+ $this->userManager->callForSeenUsers(function (IUser $user) use (&$users): void {
$users[] = $user->getUID();
});
$userValues = $this->config->getUserValueForUsers('files_trashbin', 'trashbin_size', $users);
diff --git a/apps/files_trashbin/tests/Command/CleanUpTest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php
index 6299400a65a..b071fa8ecdd 100644
--- a/apps/files_trashbin/tests/Command/CleanUpTest.php
+++ b/apps/files_trashbin/tests/Command/CleanUpTest.php
@@ -145,7 +145,7 @@ class CleanUpTest extends TestCase {
->getMock();
$instance->expects($this->exactly(count($userIds)))
->method('removeDeletedFiles')
- ->willReturnCallback(function ($user) use ($userIds) {
+ ->willReturnCallback(function ($user) use ($userIds): void {
$this->assertTrue(in_array($user, $userIds));
});
$this->userManager->expects($this->exactly(count($userIds)))
@@ -181,7 +181,7 @@ class CleanUpTest extends TestCase {
->willReturn($backendUsers);
$instance->expects($this->exactly(count($backendUsers)))
->method('removeDeletedFiles')
- ->willReturnCallback(function ($user) use ($backendUsers) {
+ ->willReturnCallback(function ($user) use ($backendUsers): void {
$this->assertTrue(in_array($user, $backendUsers));
});
$inputInterface = $this->createMock(InputInterface::class);