@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | $result = ""; |
134 | 134 | |
135 | - switch( $_SERVER['REQUEST_METHOD'] ) { |
|
135 | + switch ($_SERVER['REQUEST_METHOD']) { |
|
136 | 136 | |
137 | 137 | case 'POST': |
138 | 138 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | |
178 | 178 | foreach ($this->table as $regex => $value) { |
179 | 179 | |
180 | - if (preg_match("/" . $regex . "/", $path, $matches)) { |
|
180 | + if (preg_match("/".$regex."/", $path, $matches)) { |
|
181 | 181 | |
182 | 182 | $this->evalUri($value['query'], $matches); |
183 | 183 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $this->classname = $value['class']; |
191 | 191 | $this->type = $value['type']; |
192 | 192 | $this->service = implode('.', $value['service']); |
193 | - $this->service = empty($this->service)?"default":$this->service; |
|
193 | + $this->service = empty($this->service) ? "default" : $this->service; |
|
194 | 194 | |
195 | 195 | return true; |
196 | 196 | |
@@ -204,13 +204,13 @@ discard block |
||
204 | 204 | |
205 | 205 | private function evalUri($parameters, $bits) { |
206 | 206 | |
207 | - $count = 0; |
|
207 | + $count = 0; |
|
208 | 208 | |
209 | 209 | foreach ($parameters as $key => $value) { |
210 | 210 | |
211 | 211 | if (isset($bits[$key])) { |
212 | 212 | |
213 | - if (preg_match('/^' . $value['regex'] . '$/', $bits[$key], $matches)) { |
|
213 | + if (preg_match('/^'.$value['regex'].'$/', $bits[$key], $matches)) { |
|
214 | 214 | |
215 | 215 | if (count($matches) == 1) $matches = $matches[0]; |
216 | 216 |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $this->readpath( |
129 | 129 | $folders, |
130 | 130 | $value, |
131 | - $regex.'(?:\/'.$param_regex.')'. (($param_required)?'{1}':'?') |
|
131 | + $regex.'(?:\/'.$param_regex.')'.(($param_required) ? '{1}' : '?') |
|
132 | 132 | ); |
133 | 133 | |
134 | 134 | } else { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $string = preg_replace('/(?<!\\)\((?!\?)/', '(?:', $string); |
172 | 172 | $string = preg_replace('/\.([\*\+])(?!\?)/', '.\${1}?', $string); |
173 | 173 | |
174 | - return '(?P<' . $key . '>' . $string . ')' . (($field_required)?'{1}':'?'); |
|
174 | + return '(?P<'.$key.'>'.$string.')'.(($field_required) ? '{1}' : '?'); |
|
175 | 175 | |
176 | 176 | } |
177 | 177 |