@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function provides() |
| 43 | 43 | { |
| 44 | - return ['pragmarx.google2fa']; |
|
| 44 | + return [ 'pragmarx.google2fa' ]; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function register() |
| 53 | 53 | { |
| 54 | - $this->app->singleton('pragmarx.google2fa', function ($app) { |
|
| 54 | + $this->app->singleton('pragmarx.google2fa', function($app) { |
|
| 55 | 55 | return $app->make(Google2FA::class); |
| 56 | 56 | }); |
| 57 | 57 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | protected function canPassWithoutCheckingOTP() |
| 77 | 77 | { |
| 78 | 78 | return |
| 79 | - ! $this->isEnabled() || |
|
| 79 | + !$this->isEnabled() || |
|
| 80 | 80 | $this->noUserIsAuthenticated() || |
| 81 | 81 | $this->twoFactorAuthStillValid() |
| 82 | 82 | ; |
@@ -90,14 +90,14 @@ discard block |
||
| 90 | 90 | * @return mixed |
| 91 | 91 | * @throws \Exception |
| 92 | 92 | */ |
| 93 | - protected function config($string, $children = []) |
|
| 93 | + protected function config($string, $children = [ ]) |
|
| 94 | 94 | { |
| 95 | 95 | if (is_null(config(static::CONFIG_PACKAGE_NAME))) { |
| 96 | 96 | throw new \Exception('Config not found'); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | return config( |
| 100 | - implode('.', array_merge([static::CONFIG_PACKAGE_NAME, $string], (array) $children)) |
|
| 100 | + implode('.', array_merge([ static::CONFIG_PACKAGE_NAME, $string ], (array) $children)) |
|
| 101 | 101 | ); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | */ |
| 187 | 187 | protected function getOneTimePassword() |
| 188 | 188 | { |
| 189 | - if (! is_null($this->password)) { |
|
| 189 | + if (!is_null($this->password)) { |
|
| 190 | 190 | return $this->password; |
| 191 | 191 | } |
| 192 | 192 | |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | protected function makeSessionVarName($name = null) |
| 229 | 229 | { |
| 230 | - return $this->config('session_var') . (is_null($name) || empty($name)? '' : '.' . $name); |
|
| 230 | + return $this->config('session_var').(is_null($name) || empty($name) ? '' : '.'.$name); |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | /** |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | protected function makeStatusCode() |
| 263 | 263 | { |
| 264 | 264 | return |
| 265 | - $this->inputHasOneTimePassword() && ! $this->checkOTP() |
|
| 265 | + $this->inputHasOneTimePassword() && !$this->checkOTP() |
|
| 266 | 266 | ? SymfonyResponse::HTTP_UNPROCESSABLE_ENTITY |
| 267 | 267 | : SymfonyResponse::HTTP_OK |
| 268 | 268 | ; |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | { |
| 404 | 404 | return |
| 405 | 405 | (bool) $this->sessionGet(self::SESSION_AUTH_PASSED, false) && |
| 406 | - ! $this->passwordExpired() |
|
| 406 | + !$this->passwordExpired() |
|
| 407 | 407 | ; |
| 408 | 408 | } |
| 409 | 409 | |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | */ |
| 449 | 449 | protected function checkOTP() |
| 450 | 450 | { |
| 451 | - if (! $this->inputHasOneTimePassword()) { |
|
| 451 | + if (!$this->inputHasOneTimePassword()) { |
|
| 452 | 452 | return false; |
| 453 | 453 | } |
| 454 | 454 | |