@@ -128,20 +128,20 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | foreach ($decoded as $key => $string) { |
| 130 | 130 | |
| 131 | - $this->logger->debug("PARAMETER KEY: " . $key); |
|
| 131 | + $this->logger->debug("PARAMETER KEY: ".$key); |
|
| 132 | 132 | |
| 133 | - $this->logger->debug("PARAMETER STRING: " . $string); |
|
| 133 | + $this->logger->debug("PARAMETER STRING: ".$string); |
|
| 134 | 134 | |
| 135 | 135 | $param_regex .= $this->readparam($key, $string, $param_required); |
| 136 | 136 | |
| 137 | - $this->logger->debug("PARAMETER REGEX: " . $param_regex); |
|
| 137 | + $this->logger->debug("PARAMETER REGEX: ".$param_regex); |
|
| 138 | 138 | |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | $this->readpath( |
| 142 | 142 | $folders, |
| 143 | 143 | $value, |
| 144 | - $regex.'(?:\/'.$param_regex.')'. (($param_required)?'{1}':'?') |
|
| 144 | + $regex.'(?:\/'.$param_regex.')'.(($param_required) ? '{1}' : '?') |
|
| 145 | 145 | ); |
| 146 | 146 | |
| 147 | 147 | } else { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $string = preg_replace('/(?<!\\)\((?!\?)/', '(?:', $string); |
| 185 | 185 | $string = preg_replace('/\.([\*\+])(?!\?)/', '.\${1}?', $string); |
| 186 | 186 | |
| 187 | - return '(?P<' . $key . '>' . $string . ')' . (($field_required)?'{1}':'?'); |
|
| 187 | + return '(?P<'.$key.'>'.$string.')'.(($field_required) ? '{1}' : '?'); |
|
| 188 | 188 | |
| 189 | 189 | } |
| 190 | 190 | |
@@ -200,15 +200,15 @@ discard block |
||
| 200 | 200 | "query" => array() |
| 201 | 201 | ); |
| 202 | 202 | |
| 203 | - $this->logger->debug("ROUTE: " . $route); |
|
| 203 | + $this->logger->debug("ROUTE: ".$route); |
|
| 204 | 204 | |
| 205 | - $this->logger->debug("PARAMETERS: " . var_export($value, true)); |
|
| 205 | + $this->logger->debug("PARAMETERS: ".var_export($value, true)); |
|
| 206 | 206 | |
| 207 | 207 | $regex = $this->readpath($folders, $value); |
| 208 | 208 | |
| 209 | - $this->logger->debug("ROUTE: " . $regex); |
|
| 209 | + $this->logger->debug("ROUTE: ".$regex); |
|
| 210 | 210 | |
| 211 | - $this->logger->debug("PARAMETERS: " . var_export($value, true)); |
|
| 211 | + $this->logger->debug("PARAMETERS: ".var_export($value, true)); |
|
| 212 | 212 | |
| 213 | 213 | $this->routes[$regex] = $value; |
| 214 | 214 | |
@@ -73,10 +73,11 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $regex = $this->readpath($folders); |
| 75 | 75 | |
| 76 | - if (isset($this->routes[$regex])) |
|
| 77 | - return $this->routes[$regex]; |
|
| 78 | - else |
|
| 79 | - return null; |
|
| 76 | + if (isset($this->routes[$regex])) { |
|
| 77 | + return $this->routes[$regex]; |
|
| 78 | + } else { |
|
| 79 | + return null; |
|
| 80 | + } |
|
| 80 | 81 | |
| 81 | 82 | } |
| 82 | 83 | |
@@ -86,7 +87,9 @@ discard block |
||
| 86 | 87 | |
| 87 | 88 | $regex = $this->readpath($folders); |
| 88 | 89 | |
| 89 | - if (isset($this->routes[$regex])) unset($this->routes[$regex]); |
|
| 90 | + if (isset($this->routes[$regex])) { |
|
| 91 | + unset($this->routes[$regex]); |
|
| 92 | + } |
|
| 90 | 93 | |
| 91 | 94 | } |
| 92 | 95 | |