From caff1023ea72bb2ea94130e18a2a6e2ccf819e5f Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 10 Apr 2020 14:19:56 +0200 Subject: 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 --- lib/private/Authentication/Exceptions/InvalidProviderException.php | 2 -- lib/private/Authentication/Exceptions/InvalidTokenException.php | 1 - lib/private/Authentication/Exceptions/LoginRequiredException.php | 1 - .../Authentication/Exceptions/PasswordLoginForbiddenException.php | 1 - lib/private/Authentication/Exceptions/PasswordlessTokenException.php | 1 - lib/private/Authentication/Exceptions/TokenPasswordExpiredException.php | 1 - .../Authentication/Exceptions/TwoFactorAuthRequiredException.php | 1 - lib/private/Authentication/Exceptions/UserAlreadyLoggedInException.php | 1 - 8 files changed, 9 deletions(-) (limited to 'lib/private/Authentication/Exceptions') 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 { - } -- cgit v1.2.3