Completed
Push — master ( 3b4c18...beba29 )
by Sinnarasa
04:35
created
src/Routing/Middleware.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -101,7 +101,9 @@  discard block
 block discarded – undo
101 101
     {
102 102
         if (isset($this->middleware[$action]['global_middleware'])) {
103 103
             foreach ($this->middleware[$action]['global_middleware'] as $class) {
104
-                if (class_exists($class)) return $this->callHandler($class);
104
+                if (class_exists($class)) {
105
+                    return $this->callHandler($class);
106
+                }
105 107
             }
106 108
         }
107 109
         return true;
@@ -120,7 +122,9 @@  discard block
 block discarded – undo
120 122
                 if (is_array($blocks)) {
121 123
                     foreach ($blocks as $block) {
122 124
                         if (class_exists($block)) {
123
-                            if ($this->callHandler($block) === false) return false;
125
+                            if ($this->callHandler($block) === false) {
126
+                                return false;
127
+                            }
124 128
                         }
125 129
                     }
126 130
                 } elseif (is_string($blocks) && class_exists($blocks)) {
@@ -144,7 +148,9 @@  discard block
 block discarded – undo
144 148
                 $classes = $this->middleware[$action]['class_middleware'][$ctrl];
145 149
                 if (is_array($classes)) {
146 150
                     foreach ($classes as $class) {
147
-                        if ($this->callHandler($class) === false) return false;
151
+                        if ($this->callHandler($class) === false) {
152
+                            return false;
153
+                        }
148 154
                     }
149 155
                 } elseif (is_string($classes)) {
150 156
                     return $this->callHandler($classes);
@@ -166,7 +172,9 @@  discard block
 block discarded – undo
166 172
                 $classes = $this->middleware[$action]['route_middleware'][$this->router->route->getPath()['middleware']];
167 173
                 if (is_array($classes)) {
168 174
                     foreach ($classes as $class) {
169
-                        if ($this->callHandler($class) === false) return false;
175
+                        if ($this->callHandler($class) === false) {
176
+                            return false;
177
+                        }
170 178
                     }
171 179
                 } elseif (is_string($classes)) {
172 180
                     return $this->callHandler($classes);
Please login to merge, or discard this patch.