aboutsummaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-09-23 15:10:30 +0200
committerGitHub <noreply@github.com>2024-09-23 15:10:30 +0200
commit8927510685f59555cf337866370b572934e41408 (patch)
treea62f3441fce0ff3ea51455dba9a6ca0fc207933d /apps/twofactor_backupcodes
parentd4839b962bad250ab1aa1c40e16c2408ae53a8b2 (diff)
parent98efa3bda838065fb9ff5740f2688fe2b526ae2d (diff)
downloadnextcloud-server-8927510685f59555cf337866370b572934e41408.tar.gz
nextcloud-server-8927510685f59555cf337866370b572934e41408.zip
Merge pull request #48223 from nextcloud/feat/add-rector-config
Add rector config
Diffstat (limited to 'apps/twofactor_backupcodes')
-rw-r--r--apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php2
-rw-r--r--apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php2
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php
index bd8a1d6798a..68965583c1b 100644
--- a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php
+++ b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php
@@ -39,7 +39,7 @@ class CheckBackupCodes extends QueuedJob {
}
protected function run($argument) {
- $this->userManager->callForSeenUsers(function (IUser $user) {
+ $this->userManager->callForSeenUsers(function (IUser $user): void {
if (!$user->isEnabled()) {
return;
}
diff --git a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
index cab2033e94e..ef6c21d8e0b 100644
--- a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
+++ b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php
@@ -87,7 +87,7 @@ class BackupCodeStorage {
$codes = $this->mapper->getBackupCodes($user);
$total = count($codes);
$used = 0;
- array_walk($codes, function (BackupCode $code) use (&$used) {
+ array_walk($codes, function (BackupCode $code) use (&$used): void {
if ((int)$code->getUsed() === 1) {
$used++;
}
diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php
index 7b6fe6cb2d8..5b8281e278e 100644
--- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php
@@ -50,7 +50,7 @@ class CheckBackupCodeTest extends TestCase {
$this->user = $this->createMock(IUser::class);
$this->userManager->method('callForSeenUsers')
- ->willReturnCallback(function (\Closure $e) {
+ ->willReturnCallback(function (\Closure $e): void {
$e($this->user);
});