Completed
Push — 4.0 ( 6a2270...a7534e )
by Marco
12:55
created
src/Comodojo/Dispatcher/Router/Route.php 1 patch
Braces   +6 added lines, -2 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
 
@@ -294,7 +295,10 @@  discard block
 block discarded – undo
294 295
                  */
295 296
                 if (preg_match('/^' . $value['regex'] . '$/', $bits[$key], $matches)) {
296 297
                     
297
-                    if (count($matches) == 1) $matches = $matches[0]; // This is the case where no backreferences are present or available.
298
+                    if (count($matches) == 1) {
299
+                        $matches = $matches[0];
300
+                    }
301
+                    // This is the case where no backreferences are present or available.
298 302
                     
299 303
                     // The extracted value (with any backreference available) is added to the query parameters.
300 304
                     $this->request->query()->set($key, $matches);
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Router/Parser.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,9 @@
 block discarded – undo
103 103
                      */
104 104
                     $param_regex .= $this->param($key, $string, $value);
105 105
                     
106
-                    if ($value->isQueryRequired($key)) $param_required = true;
106
+                    if ($value->isQueryRequired($key)) {
107
+                        $param_required = true;
108
+                    }
107 109
 
108 110
                     $this->logger->debug("PARAMETER REGEX: " . $param_regex);
109 111
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Router/Model.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,9 @@
 block discarded – undo
104 104
 
105 105
         if (!$this->bypass) {
106 106
             
107
-            if (!$this->parse()) throw new DispatcherException("Unable to find a valid route for the specified uri", 0, null, 404);
107
+            if (!$this->parse()) {
108
+                throw new DispatcherException("Unable to find a valid route for the specified uri", 0, null, 404);
109
+            }
108 110
 
109 111
         }
110 112
         
Please login to merge, or discard this patch.