@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | public function getLocalName() { |
| 63 | 63 | |
| 64 | 64 | if (!empty($this->path)) |
| 65 | - return $this->path . "/" . $this->slug; |
|
| 65 | + return $this->path."/".$this->slug; |
|
| 66 | 66 | else |
| 67 | 67 | return ''; |
| 68 | 68 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | !empty($this->path) && |
| 118 | 118 | !empty($this->slug) && |
| 119 | 119 | file_exists($this->getLocalName()) && |
| 120 | - file_exists($this->getLocalName() . ".data") |
|
| 120 | + file_exists($this->getLocalName().".data") |
|
| 121 | 121 | ); |
| 122 | 122 | |
| 123 | 123 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | private function loadFileInfo() { |
| 204 | 204 | |
| 205 | - $info = $this->getLocalName() . ".data"; |
|
| 205 | + $info = $this->getLocalName().".data"; |
|
| 206 | 206 | |
| 207 | 207 | if (file_exists($info)) { |
| 208 | 208 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | |
| 224 | 224 | private function saveFileInfo() { |
| 225 | 225 | |
| 226 | - $info = $this->getLocalName() . ".data"; |
|
| 226 | + $info = $this->getLocalName().".data"; |
|
| 227 | 227 | |
| 228 | 228 | if (!empty($this->path) && file_exists($this->path)) { |
| 229 | 229 | |
@@ -248,17 +248,17 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | preg_match_all("/[a-z0-9]+/", iconv("UTF-8", "ASCII//TRANSLIT", strtolower(preg_replace('/\..*?$/', '', $this->fname))), $matches); |
| 250 | 250 | |
| 251 | - $this->slug = implode('-', $matches[0]); |
|
| 251 | + $this->slug = implode('-', $matches[0]); |
|
| 252 | 252 | |
| 253 | 253 | if (!empty($this->path)) { |
| 254 | 254 | |
| 255 | - $files = glob($this->path . "/" . $slug . "*"); |
|
| 255 | + $files = glob($this->path."/".$slug."*"); |
|
| 256 | 256 | |
| 257 | - $count = count ($files); |
|
| 257 | + $count = count($files); |
|
| 258 | 258 | |
| 259 | 259 | if ($count > 0) { |
| 260 | 260 | |
| 261 | - $this->slug .= "-" . $count; |
|
| 261 | + $this->slug .= "-".$count; |
|
| 262 | 262 | |
| 263 | 263 | } |
| 264 | 264 | |
@@ -117,9 +117,9 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | public function load($routes) { |
| 119 | 119 | |
| 120 | - if ( !empty($routes) ) { |
|
| 120 | + if (!empty($routes)) { |
|
| 121 | 121 | |
| 122 | - foreach( $routes as $name => $route ) { |
|
| 122 | + foreach ($routes as $name => $route) { |
|
| 123 | 123 | |
| 124 | 124 | $this->add($route['route'], $route['type'], $route['class'], $route['parameters']); |
| 125 | 125 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | private function readCache() { |
| 137 | 137 | |
| 138 | - if ( $this->configuration()->get('routing-table-cache') !== true ) return; |
|
| 138 | + if ($this->configuration()->get('routing-table-cache') !== true) return; |
|
| 139 | 139 | |
| 140 | 140 | $this->routes = $this->cache->setNamespace('dispatcherinternals')->get("dispatcher-routes"); |
| 141 | 141 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | private function dumpCache() { |
| 149 | 149 | |
| 150 | - if ( $this->configuration()->get('routing-table-cache') !== true ) return; |
|
| 150 | + if ($this->configuration()->get('routing-table-cache') !== true) return; |
|
| 151 | 151 | |
| 152 | 152 | $ttl = $this->configuration()->get('routing-table-ttl'); |
| 153 | 153 | |
@@ -166,14 +166,14 @@ discard block |
||
| 166 | 166 | ->setClassName($class) // Class to be invoked |
| 167 | 167 | ->setParameters($parameters); // Parameters passed via the composer.json configuration (cache, ttl, etc...) |
| 168 | 168 | |
| 169 | - $this->logger->debug("ROUTE: " . implode("/", $folders)); |
|
| 169 | + $this->logger->debug("ROUTE: ".implode("/", $folders)); |
|
| 170 | 170 | |
| 171 | 171 | //$this->logger->debug("PARAMETERS: " . var_export($value, true)); |
| 172 | 172 | |
| 173 | 173 | // This method generate a global regular expression which will be able to match all the URI supported by the route |
| 174 | 174 | $regex = $this->parser->read($folders, $route); |
| 175 | 175 | |
| 176 | - $this->logger->debug("ROUTE: " . $regex); |
|
| 176 | + $this->logger->debug("ROUTE: ".$regex); |
|
| 177 | 177 | |
| 178 | 178 | //$this->logger->debug("PARAMETERS: " . var_export($value, true)); |
| 179 | 179 | |