@@ -118,8 +118,9 @@ |
||
118 | 118 | $extra |
119 | 119 | ); |
120 | 120 | |
121 | + } else { |
|
122 | + return null; |
|
121 | 123 | } |
122 | - else return null; |
|
123 | 124 | |
124 | 125 | } |
125 | 126 |
@@ -223,7 +223,10 @@ |
||
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); |
@@ -95,7 +95,9 @@ |
||
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( |
@@ -104,10 +104,11 @@ discard block |
||
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 |
||
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 |
||
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 |