Completed
Branch master (01e132)
by Mikołaj
02:54
created
src/Middleware/AuthMiddleware/GuestMiddleware.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,9 @@
 block discarded – undo
8 8
 {
9 9
     public function __invoke($request, $response, $next)
10 10
     {
11
-        if ($this->container->auth->check())
12
-            return $response->withRedirect($this->container->router->pathFor('home'));
11
+        if ($this->container->auth->check()) {
12
+                    return $response->withRedirect($this->container->router->pathFor('home'));
13
+        }
13 14
         
14 15
         $response = $next($request, $response);
15 16
         return $response;
Please login to merge, or discard this patch.
src/Validation/Rules/PasswordNotOld.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,11 +19,13 @@
 block discarded – undo
19 19
     {
20 20
         $user = User::find($_SESSION['user']);
21 21
         
22
-        if (!$user)
23
-            return false;
22
+        if (!$user) {
23
+                    return false;
24
+        }
24 25
         
25
-        if (!password_verify($value, $user->password))
26
-            return true;
26
+        if (!password_verify($value, $user->password)) {
27
+                    return true;
28
+        }
27 29
 
28 30
         return false;
29 31
     }
Please login to merge, or discard this patch.
src/Validation/Rules/PasswordOld.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,11 +19,13 @@
 block discarded – undo
19 19
     {
20 20
         $user = User::find($_SESSION['user']);
21 21
         
22
-        if (!$user)
23
-            return false;
22
+        if (!$user) {
23
+                    return false;
24
+        }
24 25
         
25
-        if (password_verify($value, $user->password))
26
-            return true;
26
+        if (password_verify($value, $user->password)) {
27
+                    return true;
28
+        }
27 29
 
28 30
         return false;
29 31
     }
Please login to merge, or discard this patch.
src/Validation/Rules/PasswordValid.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@
 block discarded – undo
28 28
             return false;
29 29
         }
30 30
         
31
-        if (password_verify($value, $user->password))
32
-            return true;
31
+        if (password_verify($value, $user->password)) {
32
+                    return true;
33
+        }
33 34
 
34 35
         return false;
35 36
     }
Please login to merge, or discard this patch.
src/Auth/Auth.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
     {
21 21
         $user = User::where('email', $email)->first();
22 22
 
23
-        if (!$user)
24
-            return false;
23
+        if (!$user) {
24
+                    return false;
25
+        }
25 26
 
26 27
         if (password_verify($password, $user->password))
27 28
         {
Please login to merge, or discard this patch.
src/Controllers/Controller.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,8 @@
 block discarded – undo
13 13
     
14 14
     public function __get($property)
15 15
     {
16
-        if ($this->container->{$property})
17
-            return $this->container->{$property};
16
+        if ($this->container->{$property}) {
17
+                    return $this->container->{$property};
18
+        }
18 19
     }
19 20
 }
20 21
\ No newline at end of file
Please login to merge, or discard this patch.