Completed
Push — master ( 975112...14a546 )
by Siro Díaz
02:05
created
Routify/Order.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $this->uri = $uri;
36 36
         $this->method = $method;
37 37
         $this->response = $response;
38
-        if($this->isValidMiddleware($middlewares)) {
38
+        if ($this->isValidMiddleware($middlewares)) {
39 39
             $this->middlewares = $middlewares;
40 40
         }
41 41
     }
@@ -112,15 +112,15 @@  discard block
 block discarded – undo
112 112
 
113 113
     private function isValidMiddleware($middleware) {
114 114
         // if there is not middlewares then it is valid
115
-        if(count($middleware) === 0) {
115
+        if (count($middleware) === 0) {
116 116
             return true;
117 117
         }
118 118
 
119
-        foreach($middleware as $key => $value) {
120
-            if(!in_array($key, $this->middlewareTypes)) {
119
+        foreach ($middleware as $key => $value) {
120
+            if (!in_array($key, $this->middlewareTypes)) {
121 121
                 throw new InvalidMiddlewareException("Only before and after middleware types are valid");
122 122
             }
123
-            if(!is_callable($value)) {
123
+            if (!is_callable($value)) {
124 124
                 throw new InvalidMiddlewareException("The middleware must be callable");
125 125
             }
126 126
         }
Please login to merge, or discard this patch.