Passed
Push — master ( 624a9a...4c85b9 )
by Arthur
36:47
created
src/Foundation/Guard/Resolvers/GuardsResolver.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,13 +31,14 @@
 block discarded – undo
31 31
         $guards = [];
32 32
         if (!is_array($this->guard)) {
33 33
             $guards[] = $this->guard;
34
+        } else {
35
+                $guards = $this->guard;
34 36
         }
35
-        else
36
-        $guards = $this->guard;
37 37
 
38 38
         foreach ($guards as $guard) {
39
-            if (!($guard instanceof GuardContract))
40
-                throw new UnexpectedTypeException($guard, GuardContract::class);
39
+            if (!($guard instanceof GuardContract)) {
40
+                            throw new UnexpectedTypeException($guard, GuardContract::class);
41
+            }
41 42
         }
42 43
         return $guards;
43 44
     }
Please login to merge, or discard this patch.
src/Foundation/Guard/Dispatcher/GuardDispatcher.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,10 +45,11 @@
 block discarded – undo
45 45
     {
46 46
         foreach ($this->guards as $guard) {
47 47
             if ($guard->condition()) {
48
-                if (isset($this->exception))
49
-                    throw $this->exception;
50
-                else
51
-                    throw $guard->exception();
48
+                if (isset($this->exception)) {
49
+                                    throw $this->exception;
50
+                } else {
51
+                                    throw $guard->exception();
52
+                }
52 53
             }
53 54
         }
54 55
     }
Please login to merge, or discard this patch.