Completed
Push — 4.0 ( 25fc97...6a2270 )
by Marco
16:06
created
src/Comodojo/Dispatcher/Router/Route.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,8 +118,9 @@
 block discarded – undo
118 118
                 $extra
119 119
             );
120 120
 
121
+        } else {
122
+            return null;
121 123
         }
122
-        else return null;
123 124
 
124 125
     }
125 126
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Router/Model.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -223,7 +223,10 @@
 block discarded – undo
223 223
                  */
224 224
                 if (preg_match('/^' . $value['regex'] . '$/', $bits[$key], $matches)) {
225 225
                     
226
-                    if (count($matches) == 1) $matches = $matches[0]; // This is the case where no backreferences are present or available.
226
+                    if (count($matches) == 1) {
227
+                        $matches = $matches[0];
228
+                    }
229
+                    // This is the case where no backreferences are present or available.
227 230
                     
228 231
                     // The extracted value (with any backreference available) is added to the query parameters.
229 232
                     $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
@@ -95,7 +95,9 @@
 block discarded – undo
95 95
 
96 96
             } else {
97 97
                 // if the element is not a json string, I assume it's the service name
98
-                if (!isset($value['service'])) $value['service'] = array();
98
+                if (!isset($value['service'])) {
99
+                    $value['service'] = array();
100
+                }
99 101
                 array_push($value['service'], $folder);
100 102
 
101 103
                 return $this->read(
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Router/Table.php 1 patch
Braces   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -104,10 +104,11 @@  discard block
 block discarded – undo
104 104
 
105 105
         $regex = $this->parser->read($folders);
106 106
 
107
-        if (isset($this->routes[$regex]))
108
-            return $this->routes[$regex];
109
-        else
110
-            return null;
107
+        if (isset($this->routes[$regex])) {
108
+                    return $this->routes[$regex];
109
+        } else {
110
+                    return null;
111
+        }
111 112
 
112 113
     }
113 114
 
@@ -117,7 +118,9 @@  discard block
 block discarded – undo
117 118
 
118 119
         $regex = $this->parser->read($folders);
119 120
 
120
-        if (isset($this->routes[$regex])) unset($this->routes[$regex]);
121
+        if (isset($this->routes[$regex])) {
122
+            unset($this->routes[$regex]);
123
+        }
121 124
 
122 125
     }
123 126
 
@@ -165,7 +168,9 @@  discard block
 block discarded – undo
165 168
         
166 169
         $routes = $this->cache->get("dispatcher_routes");
167 170
         
168
-        if (is_null($routes)) return null;
171
+        if (is_null($routes)) {
172
+            return null;
173
+        }
169 174
         
170 175
         $this->routes($routes);
171 176
         
Please login to merge, or discard this patch.