Completed
Push — 4.0 ( 75a76e...0161d2 )
by Marco
14:59
created
src/Comodojo/Dispatcher/Router/Collector.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -113,8 +113,9 @@  discard block
 block discarded – undo
113 113
                 $this->extra
114 114
             );
115 115
 
116
+        } else {
117
+            return null;
116 118
         }
117
-        else return null;
118 119
 
119 120
     }
120 121
 
@@ -250,7 +251,9 @@  discard block
 block discarded – undo
250 251
         
251 252
         $routes = $this->cache->get("dispatcher_routes");
252 253
         
253
-        if (is_null($routes)) return null;
254
+        if (is_null($routes)) {
255
+            return null;
256
+        }
254 257
         
255 258
         $this->table->routes($routes);
256 259
         
@@ -317,7 +320,10 @@  discard block
 block discarded – undo
317 320
                  */
318 321
                 if (preg_match('/^' . $value['regex'] . '$/', $bits[$key], $matches)) {
319 322
                     
320
-                    if (count($matches) == 1) $matches = $matches[0]; // This is the case where no backreferences are present or available.
323
+                    if (count($matches) == 1) {
324
+                        $matches = $matches[0];
325
+                    }
326
+                    // This is the case where no backreferences are present or available.
321 327
                     
322 328
                     // The extracted value (with any backreference available) is added to the query parameters.
323 329
                     $this->request->query()->set($key, $matches);
Please login to merge, or discard this patch.