aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /lib/private/Authentication
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-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')
-rw-r--r--lib/private/Authentication/Events/ARemoteWipeEvent.php1
-rw-r--r--lib/private/Authentication/Events/RemoteWipeFinished.php1
-rw-r--r--lib/private/Authentication/Events/RemoteWipeStarted.php1
-rw-r--r--lib/private/Authentication/Exceptions/InvalidProviderException.php2
-rw-r--r--lib/private/Authentication/Exceptions/InvalidTokenException.php1
-rw-r--r--lib/private/Authentication/Exceptions/LoginRequiredException.php1
-rw-r--r--lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php1
-rw-r--r--lib/private/Authentication/Exceptions/PasswordlessTokenException.php1
-rw-r--r--lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php1
-rw-r--r--lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php1
-rw-r--r--lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php1
-rw-r--r--lib/private/Authentication/Listeners/LoginFailedListener.php3
-rw-r--r--lib/private/Authentication/Listeners/RemoteWipeActivityListener.php1
-rw-r--r--lib/private/Authentication/Listeners/RemoteWipeEmailListener.php1
-rw-r--r--lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php1
-rw-r--r--lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php1
-rw-r--r--lib/private/Authentication/Login/ALoginCommand.php1
-rw-r--r--lib/private/Authentication/Login/Chain.php1
-rw-r--r--lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php1
-rw-r--r--lib/private/Authentication/Login/CompleteLoginCommand.php1
-rw-r--r--lib/private/Authentication/Login/EmailLoginCommand.php1
-rw-r--r--lib/private/Authentication/Login/FinishRememberedLoginCommand.php1
-rw-r--r--lib/private/Authentication/Login/LoggedInCheckCommand.php1
-rw-r--r--lib/private/Authentication/Login/LoginData.php1
-rw-r--r--lib/private/Authentication/Login/LoginResult.php1
-rw-r--r--lib/private/Authentication/Login/SetUserTimezoneCommand.php1
-rw-r--r--lib/private/Authentication/Login/TwoFactorCommand.php1
-rw-r--r--lib/private/Authentication/Login/UidLoginCommand.php1
-rw-r--r--lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php1
-rw-r--r--lib/private/Authentication/Login/UserDisabledCheckCommand.php1
-rw-r--r--lib/private/Authentication/Login/WebAuthnLoginCommand.php1
-rw-r--r--lib/private/Authentication/LoginCredentials/Credentials.php1
-rw-r--r--lib/private/Authentication/LoginCredentials/Store.php1
-rw-r--r--lib/private/Authentication/Token/DefaultToken.php1
-rw-r--r--lib/private/Authentication/Token/DefaultTokenCleanupJob.php2
-rw-r--r--lib/private/Authentication/Token/DefaultTokenMapper.php2
-rw-r--r--lib/private/Authentication/Token/DefaultTokenProvider.php1
-rw-r--r--lib/private/Authentication/Token/IToken.php1
-rw-r--r--lib/private/Authentication/Token/IWipeableToken.php1
-rw-r--r--lib/private/Authentication/Token/Manager.php4
-rw-r--r--lib/private/Authentication/Token/PublicKeyToken.php1
-rw-r--r--lib/private/Authentication/Token/PublicKeyTokenMapper.php1
-rw-r--r--lib/private/Authentication/Token/RemoteWipe.php1
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Db/ProviderUserAssignmentDao.php3
-rw-r--r--lib/private/Authentication/TwoFactorAuth/EnforcementState.php1
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Manager.php3
-rw-r--r--lib/private/Authentication/TwoFactorAuth/MandatoryTwoFactor.php2
-rw-r--r--lib/private/Authentication/TwoFactorAuth/ProviderLoader.php2
-rw-r--r--lib/private/Authentication/TwoFactorAuth/ProviderManager.php1
-rw-r--r--lib/private/Authentication/TwoFactorAuth/ProviderSet.php1
-rw-r--r--lib/private/Authentication/WebAuthn/CredentialRepository.php2
-rw-r--r--lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php1
-rw-r--r--lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php2
-rw-r--r--lib/private/Authentication/WebAuthn/Manager.php3
54 files changed, 3 insertions, 69 deletions
diff --git a/lib/private/Authentication/Events/ARemoteWipeEvent.php b/lib/private/Authentication/Events/ARemoteWipeEvent.php
index 111c6cfeeef..8d28cc5c783 100644
--- a/lib/private/Authentication/Events/ARemoteWipeEvent.php
+++ b/lib/private/Authentication/Events/ARemoteWipeEvent.php
@@ -42,5 +42,4 @@ abstract class ARemoteWipeEvent extends Event {
public function getToken(): IToken {
return $this->token;
}
-
}
diff --git a/lib/private/Authentication/Events/RemoteWipeFinished.php b/lib/private/Authentication/Events/RemoteWipeFinished.php
index 0a33ebf635f..d50b7d28077 100644
--- a/lib/private/Authentication/Events/RemoteWipeFinished.php
+++ b/lib/private/Authentication/Events/RemoteWipeFinished.php
@@ -27,5 +27,4 @@ declare(strict_types=1);
namespace OC\Authentication\Events;
class RemoteWipeFinished extends ARemoteWipeEvent {
-
}
diff --git a/lib/private/Authentication/Events/RemoteWipeStarted.php b/lib/private/Authentication/Events/RemoteWipeStarted.php
index 565c9660de6..89b560511a7 100644
--- a/lib/private/Authentication/Events/RemoteWipeStarted.php
+++ b/lib/private/Authentication/Events/RemoteWipeStarted.php
@@ -27,5 +27,4 @@ declare(strict_types=1);
namespace OC\Authentication\Events;
class RemoteWipeStarted extends ARemoteWipeEvent {
-
}
diff --git a/lib/private/Authentication/Exceptions/InvalidProviderException.php b/lib/private/Authentication/Exceptions/InvalidProviderException.php
index 090150e4a33..970096540c4 100644
--- a/lib/private/Authentication/Exceptions/InvalidProviderException.php
+++ b/lib/private/Authentication/Exceptions/InvalidProviderException.php
@@ -30,9 +30,7 @@ use Exception;
use Throwable;
class InvalidProviderException extends Exception {
-
public function __construct(string $providerId, Throwable $previous = null) {
parent::__construct("The provider '$providerId' does not exist'", 0, $previous);
}
-
}
diff --git a/lib/private/Authentication/Exceptions/InvalidTokenException.php b/lib/private/Authentication/Exceptions/InvalidTokenException.php
index badcbba28e2..efc6096da88 100644
--- a/lib/private/Authentication/Exceptions/InvalidTokenException.php
+++ b/lib/private/Authentication/Exceptions/InvalidTokenException.php
@@ -25,5 +25,4 @@ namespace OC\Authentication\Exceptions;
use Exception;
class InvalidTokenException extends Exception {
-
}
diff --git a/lib/private/Authentication/Exceptions/LoginRequiredException.php b/lib/private/Authentication/Exceptions/LoginRequiredException.php
index 1c55e122d01..9d9ce055788 100644
--- a/lib/private/Authentication/Exceptions/LoginRequiredException.php
+++ b/lib/private/Authentication/Exceptions/LoginRequiredException.php
@@ -25,5 +25,4 @@ namespace OC\Authentication\Exceptions;
use Exception;
class LoginRequiredException extends Exception {
-
}
diff --git a/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php b/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php
index 05815cab9f4..02ddd06020d 100644
--- a/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php
+++ b/lib/private/Authentication/Exceptions/PasswordLoginForbiddenException.php
@@ -25,5 +25,4 @@ namespace OC\Authentication\Exceptions;
use Exception;
class PasswordLoginForbiddenException extends Exception {
-
}
diff --git a/lib/private/Authentication/Exceptions/PasswordlessTokenException.php b/lib/private/Authentication/Exceptions/PasswordlessTokenException.php
index e5ba5d87ad5..5c59dd35366 100644
--- a/lib/private/Authentication/Exceptions/PasswordlessTokenException.php
+++ b/lib/private/Authentication/Exceptions/PasswordlessTokenException.php
@@ -25,5 +25,4 @@ namespace OC\Authentication\Exceptions;
use Exception;
class PasswordlessTokenException extends Exception {
-
}
diff --git a/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php b/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php
index b4691a7a0c4..2850d3de7e1 100644
--- a/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php
+++ b/lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php
@@ -27,5 +27,4 @@ declare(strict_types=1);
namespace OC\Authentication\Exceptions;
class TokenPasswordExpiredException extends ExpiredTokenException {
-
}
diff --git a/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php b/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php
index c9c5a03e021..6db87b3516c 100644
--- a/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php
+++ b/lib/private/Authentication/Exceptions/TwoFactorAuthRequiredException.php
@@ -25,5 +25,4 @@ namespace OC\Authentication\Exceptions;
use Exception;
class TwoFactorAuthRequiredException extends Exception {
-
}
diff --git a/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php b/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php
index 9c1c2a9a441..878bf59e4e9 100644
--- a/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php
+++ b/lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php
@@ -25,5 +25,4 @@ namespace OC\Authentication\Exceptions;
use Exception;
class UserAlreadyLoggedInException extends Exception {
-
}
diff --git a/lib/private/Authentication/Listeners/LoginFailedListener.php b/lib/private/Authentication/Listeners/LoginFailedListener.php
index 8086194eab3..d56e24cce70 100644
--- a/lib/private/Authentication/Listeners/LoginFailedListener.php
+++ b/lib/private/Authentication/Listeners/LoginFailedListener.php
@@ -57,9 +57,8 @@ class LoginFailedListener implements IEventListener {
'preLoginNameUsedAsUserName',
['uid' => &$uid]
);
- if($this->userManager->userExists($uid)) {
+ if ($this->userManager->userExists($uid)) {
$this->dispatcher->dispatchTyped(new LoginFailedEvent($uid));
}
}
-
}
diff --git a/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php b/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php
index 5acd228b133..0ab2dcf4837 100644
--- a/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php
+++ b/lib/private/Authentication/Listeners/RemoteWipeActivityListener.php
@@ -76,5 +76,4 @@ class RemoteWipeActivityListener implements IEventListener {
]);
}
}
-
}
diff --git a/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php b/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php
index 6c0ca16859b..799c4ea4cf5 100644
--- a/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php
+++ b/lib/private/Authentication/Listeners/RemoteWipeEmailListener.php
@@ -170,5 +170,4 @@ class RemoteWipeEmailListener implements IEventListener {
return $message;
}
-
}
diff --git a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php
index 4b021d67c75..831107a05cd 100644
--- a/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php
+++ b/lib/private/Authentication/Listeners/RemoteWipeNotificationsListener.php
@@ -68,5 +68,4 @@ class RemoteWipeNotificationsListener implements IEventListener {
]);
$this->notificationManager->notify($notification);
}
-
}
diff --git a/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php b/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php
index dc0be4e2e9b..c8f2da82db6 100644
--- a/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php
+++ b/lib/private/Authentication/Listeners/UserDeletedStoreCleanupListener.php
@@ -47,5 +47,4 @@ class UserDeletedStoreCleanupListener implements IEventListener {
$this->registry->deleteUserData($event->getUser());
}
-
}
diff --git a/lib/private/Authentication/Login/ALoginCommand.php b/lib/private/Authentication/Login/ALoginCommand.php
index e27b0db173e..8ad162842bf 100644
--- a/lib/private/Authentication/Login/ALoginCommand.php
+++ b/lib/private/Authentication/Login/ALoginCommand.php
@@ -44,5 +44,4 @@ abstract class ALoginCommand {
}
public abstract function process(LoginData $loginData): LoginResult;
-
}
diff --git a/lib/private/Authentication/Login/Chain.php b/lib/private/Authentication/Login/Chain.php
index c86a932d6b6..1fc94fe9637 100644
--- a/lib/private/Authentication/Login/Chain.php
+++ b/lib/private/Authentication/Login/Chain.php
@@ -107,5 +107,4 @@ class Chain {
return $chain->process($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php b/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php
index 9f4e970c9cc..f4e1ad11dd0 100644
--- a/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php
+++ b/lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php
@@ -48,5 +48,4 @@ class ClearLostPasswordTokensCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/CompleteLoginCommand.php b/lib/private/Authentication/Login/CompleteLoginCommand.php
index 210b3ba9a88..d0cddba595c 100644
--- a/lib/private/Authentication/Login/CompleteLoginCommand.php
+++ b/lib/private/Authentication/Login/CompleteLoginCommand.php
@@ -47,5 +47,4 @@ class CompleteLoginCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/EmailLoginCommand.php b/lib/private/Authentication/Login/EmailLoginCommand.php
index c281ddc6737..24b5a00196b 100644
--- a/lib/private/Authentication/Login/EmailLoginCommand.php
+++ b/lib/private/Authentication/Login/EmailLoginCommand.php
@@ -57,5 +57,4 @@ class EmailLoginCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/FinishRememberedLoginCommand.php b/lib/private/Authentication/Login/FinishRememberedLoginCommand.php
index 4c4b37b0801..1d33f103fdf 100644
--- a/lib/private/Authentication/Login/FinishRememberedLoginCommand.php
+++ b/lib/private/Authentication/Login/FinishRememberedLoginCommand.php
@@ -43,5 +43,4 @@ class FinishRememberedLoginCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/LoggedInCheckCommand.php b/lib/private/Authentication/Login/LoggedInCheckCommand.php
index 5701f2970a8..5fd1f1af4ba 100644
--- a/lib/private/Authentication/Login/LoggedInCheckCommand.php
+++ b/lib/private/Authentication/Login/LoggedInCheckCommand.php
@@ -59,5 +59,4 @@ class LoggedInCheckCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/LoginData.php b/lib/private/Authentication/Login/LoginData.php
index ec8ebdbab46..162e0f362d8 100644
--- a/lib/private/Authentication/Login/LoginData.php
+++ b/lib/private/Authentication/Login/LoginData.php
@@ -117,5 +117,4 @@ class LoginData {
public function isRememberLogin(): bool {
return $this->rememberLogin;
}
-
}
diff --git a/lib/private/Authentication/Login/LoginResult.php b/lib/private/Authentication/Login/LoginResult.php
index 273e0ee8d5c..60228307135 100644
--- a/lib/private/Authentication/Login/LoginResult.php
+++ b/lib/private/Authentication/Login/LoginResult.php
@@ -79,5 +79,4 @@ class LoginResult {
public function getErrorMessage(): ?string {
return $this->errorMessage;
}
-
}
diff --git a/lib/private/Authentication/Login/SetUserTimezoneCommand.php b/lib/private/Authentication/Login/SetUserTimezoneCommand.php
index d3599880228..0029f2f1677 100644
--- a/lib/private/Authentication/Login/SetUserTimezoneCommand.php
+++ b/lib/private/Authentication/Login/SetUserTimezoneCommand.php
@@ -58,5 +58,4 @@ class SetUserTimezoneCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/TwoFactorCommand.php b/lib/private/Authentication/Login/TwoFactorCommand.php
index 2c3d2fbf2c4..86b85c83fd0 100644
--- a/lib/private/Authentication/Login/TwoFactorCommand.php
+++ b/lib/private/Authentication/Login/TwoFactorCommand.php
@@ -91,5 +91,4 @@ class TwoFactorCommand extends ALoginCommand {
$this->urlGenerator->linkToRoute($url, $urlParams)
);
}
-
}
diff --git a/lib/private/Authentication/Login/UidLoginCommand.php b/lib/private/Authentication/Login/UidLoginCommand.php
index 76e06fb3e4f..8c9a516c735 100644
--- a/lib/private/Authentication/Login/UidLoginCommand.php
+++ b/lib/private/Authentication/Login/UidLoginCommand.php
@@ -53,5 +53,4 @@ class UidLoginCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php b/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php
index 9e89aa086db..efaf5554c21 100644
--- a/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php
+++ b/lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php
@@ -44,5 +44,4 @@ class UpdateLastPasswordConfirmCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/UserDisabledCheckCommand.php b/lib/private/Authentication/Login/UserDisabledCheckCommand.php
index 11f2d5f3a90..e33853ef5bd 100644
--- a/lib/private/Authentication/Login/UserDisabledCheckCommand.php
+++ b/lib/private/Authentication/Login/UserDisabledCheckCommand.php
@@ -56,5 +56,4 @@ class UserDisabledCheckCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/Login/WebAuthnLoginCommand.php b/lib/private/Authentication/Login/WebAuthnLoginCommand.php
index d2f613c59be..6aa35d43f93 100644
--- a/lib/private/Authentication/Login/WebAuthnLoginCommand.php
+++ b/lib/private/Authentication/Login/WebAuthnLoginCommand.php
@@ -45,5 +45,4 @@ class WebAuthnLoginCommand extends ALoginCommand {
return $this->processNextOrFinishSuccessfully($loginData);
}
-
}
diff --git a/lib/private/Authentication/LoginCredentials/Credentials.php b/lib/private/Authentication/LoginCredentials/Credentials.php
index b9542aed354..e4cbdccec50 100644
--- a/lib/private/Authentication/LoginCredentials/Credentials.php
+++ b/lib/private/Authentication/LoginCredentials/Credentials.php
@@ -67,5 +67,4 @@ class Credentials implements ICredentials {
public function getPassword() {
return $this->password;
}
-
}
diff --git a/lib/private/Authentication/LoginCredentials/Store.php b/lib/private/Authentication/LoginCredentials/Store.php
index a16b291f5f5..f4bedd88a18 100644
--- a/lib/private/Authentication/LoginCredentials/Store.php
+++ b/lib/private/Authentication/LoginCredentials/Store.php
@@ -118,5 +118,4 @@ class Store implements IStore {
// If we reach this line, an exception was thrown.
throw new CredentialsUnavailableException();
}
-
}
diff --git a/lib/private/Authentication/Token/DefaultToken.php b/lib/private/Authentication/Token/DefaultToken.php
index 4af42d07813..7ca05849635 100644
--- a/lib/private/Authentication/Token/DefaultToken.php
+++ b/lib/private/Authentication/Token/DefaultToken.php
@@ -43,7 +43,6 @@ use OCP\AppFramework\Db\Entity;
* @method void setVersion(int $version)
*/
class DefaultToken extends Entity implements INamedToken {
-
const VERSION = 1;
/** @var string user UID */
diff --git a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
index 25b4aa59a92..0686f40e82f 100644
--- a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
+++ b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
@@ -27,11 +27,9 @@ use OC;
use OC\BackgroundJob\Job;
class DefaultTokenCleanupJob extends Job {
-
protected function run($argument) {
/* @var $provider IProvider */
$provider = OC::$server->query(IProvider::class);
$provider->invalidateOldTokens();
}
-
}
diff --git a/lib/private/Authentication/Token/DefaultTokenMapper.php b/lib/private/Authentication/Token/DefaultTokenMapper.php
index 3f11e02d5cd..e51033ed1df 100644
--- a/lib/private/Authentication/Token/DefaultTokenMapper.php
+++ b/lib/private/Authentication/Token/DefaultTokenMapper.php
@@ -36,7 +36,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
class DefaultTokenMapper extends QBMapper {
-
public function __construct(IDBConnection $db) {
parent::__construct($db, 'authtoken');
}
@@ -168,5 +167,4 @@ class DefaultTokenMapper extends QBMapper {
->andWhere($qb->expr()->eq('version', $qb->createNamedParameter(DefaultToken::VERSION, IQueryBuilder::PARAM_INT)));
$qb->execute();
}
-
}
diff --git a/lib/private/Authentication/Token/DefaultTokenProvider.php b/lib/private/Authentication/Token/DefaultTokenProvider.php
index 05e601d78a7..3556cfd24b0 100644
--- a/lib/private/Authentication/Token/DefaultTokenProvider.php
+++ b/lib/private/Authentication/Token/DefaultTokenProvider.php
@@ -286,7 +286,6 @@ class DefaultTokenProvider implements IProvider {
$password = $this->getPassword($token, $oldTokenId);
$token->setPassword($this->encryptPassword($password, $newTokenId));
} catch (PasswordlessTokenException $e) {
-
}
$token->setToken($this->hashToken($newTokenId));
diff --git a/lib/private/Authentication/Token/IToken.php b/lib/private/Authentication/Token/IToken.php
index e2de2b5fbbd..1f7c736f86b 100644
--- a/lib/private/Authentication/Token/IToken.php
+++ b/lib/private/Authentication/Token/IToken.php
@@ -30,7 +30,6 @@ namespace OC\Authentication\Token;
use JsonSerializable;
interface IToken extends JsonSerializable {
-
const TEMPORARY_TOKEN = 0;
const PERMANENT_TOKEN = 1;
const WIPE_TOKEN = 2;
diff --git a/lib/private/Authentication/Token/IWipeableToken.php b/lib/private/Authentication/Token/IWipeableToken.php
index 62293e6933b..efc542faa69 100644
--- a/lib/private/Authentication/Token/IWipeableToken.php
+++ b/lib/private/Authentication/Token/IWipeableToken.php
@@ -33,5 +33,4 @@ interface IWipeableToken extends IToken {
* Mark the token for remote wipe
*/
public function wipe(): void;
-
}
diff --git a/lib/private/Authentication/Token/Manager.php b/lib/private/Authentication/Token/Manager.php
index dddc675a428..073569de0cf 100644
--- a/lib/private/Authentication/Token/Manager.php
+++ b/lib/private/Authentication/Token/Manager.php
@@ -139,7 +139,7 @@ class Manager implements IProvider {
throw $e;
} catch (ExpiredTokenException $e) {
throw $e;
- } catch(InvalidTokenException $e) {
+ } catch (InvalidTokenException $e) {
// No worries we try to convert it to a PublicKey Token
}
@@ -272,6 +272,4 @@ class Manager implements IProvider {
$this->defaultTokenProvider->updatePasswords($uid, $password);
$this->publicKeyTokenProvider->updatePasswords($uid, $password);
}
-
-
}
diff --git a/lib/private/Authentication/Token/PublicKeyToken.php b/lib/private/Authentication/Token/PublicKeyToken.php
index 221f286ae05..27eda0b6889 100644
--- a/lib/private/Authentication/Token/PublicKeyToken.php
+++ b/lib/private/Authentication/Token/PublicKeyToken.php
@@ -47,7 +47,6 @@ use OCP\AppFramework\Db\Entity;
* @method bool getPasswordInvalid()
*/
class PublicKeyToken extends Entity implements INamedToken, IWipeableToken {
-
const VERSION = 2;
/** @var string user UID */
diff --git a/lib/private/Authentication/Token/PublicKeyTokenMapper.php b/lib/private/Authentication/Token/PublicKeyTokenMapper.php
index 15a161aef64..e05325fec30 100644
--- a/lib/private/Authentication/Token/PublicKeyTokenMapper.php
+++ b/lib/private/Authentication/Token/PublicKeyTokenMapper.php
@@ -33,7 +33,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
class PublicKeyTokenMapper extends QBMapper {
-
public function __construct(IDBConnection $db) {
parent::__construct($db, 'authtoken');
}
diff --git a/lib/private/Authentication/Token/RemoteWipe.php b/lib/private/Authentication/Token/RemoteWipe.php
index b1fc757f744..cab68357a01 100644
--- a/lib/private/Authentication/Token/RemoteWipe.php
+++ b/lib/private/Authentication/Token/RemoteWipe.php
@@ -152,5 +152,4 @@ class RemoteWipe {
return true;
}
-
}
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;
}
-
}
diff --git a/lib/private/Authentication/WebAuthn/CredentialRepository.php b/lib/private/Authentication/WebAuthn/CredentialRepository.php
index c57af15d2e4..da552b120bf 100644
--- a/lib/private/Authentication/WebAuthn/CredentialRepository.php
+++ b/lib/private/Authentication/WebAuthn/CredentialRepository.php
@@ -68,7 +68,6 @@ class CredentialRepository implements PublicKeyCredentialSourceRepository {
try {
$oldEntity = $this->credentialMapper->findOneByCredentialId($publicKeyCredentialSource->getPublicKeyCredentialId());
} catch (IMapperException $e) {
-
}
if ($name === null) {
@@ -90,5 +89,4 @@ class CredentialRepository implements PublicKeyCredentialSourceRepository {
public function saveCredentialSource(PublicKeyCredentialSource $publicKeyCredentialSource, string $name = null): void {
$this->saveAndReturnCredentialSource($publicKeyCredentialSource, $name);
}
-
}
diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php
index 0b27c78efbd..c9ebf8ce456 100644
--- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php
+++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialEntity.php
@@ -88,5 +88,4 @@ class PublicKeyCredentialEntity extends Entity implements JsonSerializable {
'name' => $this->getName(),
];
}
-
}
diff --git a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
index c931ccbb3f0..a78ebee3072 100644
--- a/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
+++ b/lib/private/Authentication/WebAuthn/Db/PublicKeyCredentialMapper.php
@@ -31,7 +31,6 @@ use OCP\AppFramework\Db\QBMapper;
use OCP\IDBConnection;
class PublicKeyCredentialMapper extends QBMapper {
-
public function __construct(IDBConnection $db) {
parent::__construct($db, 'webauthn', PublicKeyCredentialEntity::class);
}
@@ -82,5 +81,4 @@ class PublicKeyCredentialMapper extends QBMapper {
return $this->findEntity($qb);
}
-
}
diff --git a/lib/private/Authentication/WebAuthn/Manager.php b/lib/private/Authentication/WebAuthn/Manager.php
index e33d0e48e9b..7a2e4fc6b8a 100644
--- a/lib/private/Authentication/WebAuthn/Manager.php
+++ b/lib/private/Authentication/WebAuthn/Manager.php
@@ -170,7 +170,7 @@ class Manager {
}
public function startAuthentication(string $uid, string $serverHost): PublicKeyCredentialRequestOptions {
- // List of registered PublicKeyCredentialDescriptor classes associated to the user
+ // List of registered PublicKeyCredentialDescriptor classes associated to the user
$registeredPublicKeyCredentialDescriptors = array_map(function (PublicKeyCredentialEntity $entity) {
$credential = $entity->toPublicKeyCredentialSource();
return new PublicKeyCredentialDescriptor(
@@ -230,7 +230,6 @@ class Manager {
$request,
$uid
);
-
} catch (\Throwable $e) {
throw $e;
}