@@ -8,8 +8,9 @@ |
||
| 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; |
@@ -19,11 +19,13 @@ |
||
| 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 | } |
@@ -19,11 +19,13 @@ |
||
| 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 | } |
@@ -28,8 +28,9 @@ |
||
| 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 | } |
@@ -20,8 +20,9 @@ |
||
| 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 | { |
@@ -13,7 +13,8 @@ |
||
| 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 |