Completed
Branch master (ace6dc)
by Vojta
02:20
created
components/CodeLogin.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.