@@ -10,7 +10,7 @@ |
||
| 10 | 10 | /** |
| 11 | 11 | * @var array Plugin dependencies |
| 12 | 12 | */ |
| 13 | - public $require = ['RainLab.User']; |
|
| 13 | + public $require = [ 'RainLab.User' ]; |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Returns information about this plugin. |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function onRun() |
| 65 | 65 | { |
| 66 | - $this->page['visible'] = $this->property('visible'); |
|
| 67 | - $this->page['button'] = $this->property('button'); |
|
| 66 | + $this->page[ 'visible' ] = $this->property('visible'); |
|
| 67 | + $this->page[ 'button' ] = $this->property('button'); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -77,9 +77,9 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | $data = post(); |
| 79 | 79 | |
| 80 | - $rules = []; |
|
| 81 | - $rules['code'] = 'required|min:2'; |
|
| 82 | - $messages['required'] = trans('vojtasvoboda.codelogin::lang.form.required'); |
|
| 80 | + $rules = [ ]; |
|
| 81 | + $rules[ 'code' ] = 'required|min:2'; |
|
| 82 | + $messages[ 'required' ] = trans('vojtasvoboda.codelogin::lang.form.required'); |
|
| 83 | 83 | |
| 84 | 84 | $validation = Validator::make($data, $rules, $messages); |
| 85 | 85 | if ($validation->fails()) { |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $users = new UserRepository(); |
| 93 | 93 | $userToLog = $users->getUserByPassword(array_get($data, 'code')); |
| 94 | 94 | if ($userToLog === null) { |
| 95 | - $exception = new ValidationException([trans('vojtasvoboda.codelogin::lang.form.wrong_code')]); |
|
| 95 | + $exception = new ValidationException([ trans('vojtasvoboda.codelogin::lang.form.wrong_code') ]); |
|
| 96 | 96 | throw $exception; |
| 97 | 97 | } |
| 98 | 98 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | /* |
| 109 | 109 | * After login event |
| 110 | 110 | */ |
| 111 | - Event::fire('vojtasvoboda.codelogin.afterlogin', [$user]); |
|
| 111 | + Event::fire('vojtasvoboda.codelogin.afterlogin', [ $user ]); |
|
| 112 | 112 | |
| 113 | 113 | /* |
| 114 | 114 | * Redirect to the intended page after successful sign in |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | |
| 38 | 38 | return $user; |
| 39 | 39 | |
| 40 | - } catch(AuthException $e) { |
|
| 40 | + } catch (AuthException $e) { |
|
| 41 | 41 | $user = null; |
| 42 | 42 | } |
| 43 | 43 | |