@@ -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 |
@@ -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,11 +77,11 @@ discard block |
||
77 | 77 | */ |
78 | 78 | $data = post(); |
79 | 79 | |
80 | - $rules = []; |
|
81 | - $rules['code'] = 'required|min:2'; |
|
80 | + $rules = [ ]; |
|
81 | + $rules[ 'code' ] = 'required|min:2'; |
|
82 | 82 | |
83 | - $messages = []; |
|
84 | - $messages['required'] = trans('vojtasvoboda.codelogin::lang.form.required'); |
|
83 | + $messages = [ ]; |
|
84 | + $messages[ 'required' ] = trans('vojtasvoboda.codelogin::lang.form.required'); |
|
85 | 85 | |
86 | 86 | $validation = Validator::make($data, $rules, $messages); |
87 | 87 | if ($validation->fails()) { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $users = new UserRepository(); |
95 | 95 | $userToLog = $users->getUserByPassword(array_get($data, 'code')); |
96 | 96 | if ($userToLog === null) { |
97 | - $exception = new ValidationException([trans('vojtasvoboda.codelogin::lang.form.wrong_code')]); |
|
97 | + $exception = new ValidationException([ trans('vojtasvoboda.codelogin::lang.form.wrong_code') ]); |
|
98 | 98 | throw $exception; |
99 | 99 | } |
100 | 100 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | /* |
111 | 111 | * After login event |
112 | 112 | */ |
113 | - Event::fire('vojtasvoboda.codelogin.afterlogin', [$user]); |
|
113 | + Event::fire('vojtasvoboda.codelogin.afterlogin', [ $user ]); |
|
114 | 114 | |
115 | 115 | /* |
116 | 116 | * Redirect to the intended page after successful sign in |
@@ -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. |