Completed
Push — master ( bb8c97...03c924 )
by Vojta
01:50
created
repositories/UserRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 
38 38
 				return $user;
39 39
 
40
-			} catch(AuthException $e) {
40
+			} catch (AuthException $e) {
41 41
 				$user = null;
42 42
 			}
43 43
 
Please login to merge, or discard this patch.
Plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
components/CodeLogin.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function onRun()
63 63
     {
64
-        $this->page['visible'] = $this->property('visible');
65
-        $this->page['button'] = $this->property('button');
64
+        $this->page[ 'visible' ] = $this->property('visible');
65
+        $this->page[ 'button' ] = $this->property('button');
66 66
     }
67 67
 
68 68
     /**
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
          */
76 76
         $data = post();
77 77
 
78
-        $rules = [];
79
-        $rules['code'] = 'required|min:2';
78
+        $rules = [ ];
79
+        $rules[ 'code' ] = 'required|min:2';
80 80
 
81
-        $messages = [];
82
-        $messages['required'] = trans('vojtasvoboda.codelogin::lang.form.required');
81
+        $messages = [ ];
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
 block discarded – undo
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
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
          * Event just for backward compatibility. It's more then recommand use
110 110
          * standard rainlab.user.login event - see readme.
111 111
          */
112
-        Event::fire('vojtasvoboda.codelogin.afterlogin', [$user]);
112
+        Event::fire('vojtasvoboda.codelogin.afterlogin', [ $user ]);
113 113
 
114 114
         /*
115 115
          * Redirect to the intended page after successful sign in
Please login to merge, or discard this patch.