Passed
Pull Request — master (#30)
by Nícollas
01:59
created
src/MiddlewareTrait.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
     protected function instanceMiddleware($middleware)
96 96
     {
97 97
         if (!preg_match("/\\\/", $middleware)) {
98
-            if(!$middlewareClass = $this->getMiddlewareByAlias($middleware)) return;
98
+            if (!$middlewareClass = $this->getMiddlewareByAlias($middleware)) return;
99 99
 
100 100
             return new $middlewareClass();
101 101
         }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected function getCurrentMiddlewares()
32 32
     {
33
-        if (!isset($this->currentRoute['middlewares'])) return;
33
+        if (!isset($this->currentRoute['middlewares'])) {
34
+            return;
35
+        }
34 36
 
35 37
         return $this->currentRoute['middlewares'];
36 38
     }
@@ -95,7 +97,9 @@  discard block
 block discarded – undo
95 97
     protected function instanceMiddleware($middleware)
96 98
     {
97 99
         if (!preg_match("/\\\/", $middleware)) {
98
-            if(!$middlewareClass = $this->getMiddlewareByAlias($middleware)) return;
100
+            if(!$middlewareClass = $this->getMiddlewareByAlias($middleware)) {
101
+                return;
102
+            }
99 103
 
100 104
             return new $middlewareClass();
101 105
         }
Please login to merge, or discard this patch.