diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
commit | caff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch) | |
tree | 186d494c2aea5dea7255d3584ef5d595fc6e6194 /lib/private/Authentication/TwoFactorAuth | |
parent | edf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff) | |
download | nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip |
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Authentication/TwoFactorAuth')
7 files changed, 0 insertions, 13 deletions
diff --git a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php index 4e8f9731d94..a5ddad47e01 100644 --- a/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php +++ b/lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php @@ -35,7 +35,6 @@ use OCP\IDBConnection; * 2FA providers */ class ProviderUserAssignmentDao { - const TABLE_NAME = 'twofactor_providers'; /** @var IDBConnection */ @@ -90,7 +89,6 @@ class ProviderUserAssignmentDao { ->andWhere($qb->expr()->eq('uid', $qb->createNamedParameter($uid))); $updateQuery->execute(); } - } public function deleteByUser(string $uid) { @@ -110,5 +108,4 @@ class ProviderUserAssignmentDao { $deleteQuery->execute(); } - } diff --git a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php index abd0ec7f2e7..c244843454b 100644 --- a/lib/private/Authentication/TwoFactorAuth/EnforcementState.php +++ b/lib/private/Authentication/TwoFactorAuth/EnforcementState.php @@ -82,5 +82,4 @@ class EnforcementState implements JsonSerializable { 'excludedGroups' => $this->excludedGroups, ]; } - } diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index 40e6e4082e1..ec414e67938 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -46,7 +46,6 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; class Manager { - const SESSION_UID_KEY = 'two_factor_auth_uid'; const SESSION_UID_DONE = 'two_factor_auth_passed'; const REMEMBER_LOGIN = 'two_factor_remember_login'; @@ -158,7 +157,6 @@ class Manager { */ private function fixMissingProviderStates(array $providerStates, array $providers, IUser $user): array { - foreach ($providers as $provider) { if (isset($providerStates[$provider->getId()])) { // All good @@ -384,5 +382,4 @@ class Manager { $this->tokenProvider->invalidateTokenById($userId, $tokenId); } } - } diff --git a/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php b/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php index 42e5def80de..b06a517ef80 100644 --- a/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php +++ b/lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php @@ -110,6 +110,4 @@ class MandatoryTwoFactor { */ return true; } - - } diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php index b287072dde3..0754679adf1 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderLoader.php @@ -35,7 +35,6 @@ use OCP\Authentication\TwoFactorAuth\IProvider; use OCP\IUser; class ProviderLoader { - const BACKUP_CODES_APP_ID = 'twofactor_backupcodes'; /** @var IAppManager */ @@ -86,5 +85,4 @@ class ProviderLoader { OC_App::loadApp($appId); } } - } diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderManager.php b/lib/private/Authentication/TwoFactorAuth/ProviderManager.php index 26c1af0ae17..4d3171e96f7 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderManager.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderManager.php @@ -93,5 +93,4 @@ class ProviderManager { return false; } } - } diff --git a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php index 5b5ac60fd82..c27681c6036 100644 --- a/lib/private/Authentication/TwoFactorAuth/ProviderSet.php +++ b/lib/private/Authentication/TwoFactorAuth/ProviderSet.php @@ -80,5 +80,4 @@ class ProviderSet { public function isProviderMissing(): bool { return $this->providerMissing; } - } |