diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-09 13:53:40 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-09 13:54:22 +0200 |
commit | afbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch) | |
tree | 7d8721cf8fc0329d6b750db63798de67a162b090 /apps/twofactor_backupcodes | |
parent | 19e97e86c69ab128191439d6a17dacb5a630cf98 (diff) | |
download | nextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.tar.gz nextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.zip |
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/twofactor_backupcodes')
6 files changed, 6 insertions, 6 deletions
diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php index a2e9a154d9f..61dbffb3214 100644 --- a/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php +++ b/apps/twofactor_backupcodes/lib/BackgroundJob/CheckBackupCodes.php @@ -57,7 +57,7 @@ class CheckBackupCodes extends QueuedJob { } protected function run($argument) { - $this->userManager->callForSeenUsers(function(IUser $user) { + $this->userManager->callForSeenUsers(function (IUser $user) { $providers = $this->registry->getProviderStates($user); $isTwoFactorAuthenticated = $this->twofactorManager->isTwoFactorAuthenticated($user); diff --git a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php index 7182ad561aa..4877be9fa37 100644 --- a/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php +++ b/apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php @@ -72,7 +72,7 @@ class RememberBackupCodesJob extends TimedJob { } $providers = $this->registry->getProviderStates($user); - $state2fa = array_reduce($providers, function(bool $carry, bool $state) { + $state2fa = array_reduce($providers, function (bool $carry, bool $state) { return $carry || $state; }, false); diff --git a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php index b742f606c61..6d60f589e52 100644 --- a/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php +++ b/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php @@ -143,7 +143,7 @@ class BackupCodesProvider implements IProvider, IProvidesPersonalSettings { * @return boolean */ public function isActive(IUser $user): bool { - $appIds = array_filter($this->appManager->getEnabledAppsForUser($user), function($appId) { + $appIds = array_filter($this->appManager->getEnabledAppsForUser($user), function ($appId) { return $appId !== $this->appName; }); foreach ($appIds as $appId) { diff --git a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php index 21e8f853823..3b443c9fe6b 100644 --- a/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/BackgroundJob/CheckBackupCodeTest.php @@ -69,7 +69,7 @@ class CheckBackupCodeTest extends TestCase { $this->user = $this->createMock(IUser::class); $this->userManager->method('callForSeenUsers') - ->willReturnCallback(function(\Closure $e) { + ->willReturnCallback(function (\Closure $e) { $e($this->user); }); diff --git a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php index 33f9de858a4..99d11504710 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Listener/ClearNotificationsTest.php @@ -68,7 +68,7 @@ class ClearNotificationsTest extends TestCase { $this->notificationManager->expects($this->once()) ->method('markProcessed') - ->with($this->callback(function(INotification $n) { + ->with($this->callback(function (INotification $n) { return $n->getUser() === 'fritz' && $n->getApp() === 'twofactor_backupcodes' && $n->getObjectType() === 'create' && diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php index e0cfa80b29a..996dba1a9b6 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php @@ -53,7 +53,7 @@ class NotifierTest extends TestCase { $this->l = $this->createMock(IL10N::class); $this->l->expects($this->any()) ->method('t') - ->willReturnCallback(function($string, $args) { + ->willReturnCallback(function ($string, $args) { return vsprintf($string, $args); }); $this->factory = $this->createMock(IFactory::class); |