@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | return $this->dispatcher; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - $routeDefinitionCallback = function (RouteCollector $r) { |
|
| 159 | + $routeDefinitionCallback = function(RouteCollector $r) { |
|
| 160 | 160 | foreach ($this->getRoutes() as $route) { |
| 161 | 161 | $r->addRoute($route->getMethod(), $route->getPattern(), $route->getIdentifier()); |
| 162 | 162 | } |
@@ -176,12 +176,12 @@ discard block |
||
| 176 | 176 | $uri->getPath() |
| 177 | 177 | ); |
| 178 | 178 | |
| 179 | - $functionHandler = function ($arg) use ($uri, $method) { |
|
| 179 | + $functionHandler = function($arg) use ($uri, $method) { |
|
| 180 | 180 | if (method_exists($this, $arg['methodName']) || $this->hasMethod($arg['methodName'])) { |
| 181 | 181 | return $this->{$arg['methodName']}(...$arg['args']); |
| 182 | 182 | } else { |
| 183 | 183 | if ($arg['methodName'] === $this->notFoundFuncName) { |
| 184 | - throw new BadMethodCallException('Method : '. ((string) $method) . ' ON uri : ' . ((string) $uri) . ' Not Allowed'); |
|
| 184 | + throw new BadMethodCallException('Method : ' . ((string) $method) . ' ON uri : ' . ((string) $uri) . ' Not Allowed'); |
|
| 185 | 185 | } elseif ($arg['methodName'] === $this->forbiddenFuncName) { |
| 186 | 186 | throw new BadMethodCallException(((string) $uri) . ' Not Available'); |
| 187 | 187 | } else { |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | if (!is_string($query) && !method_exists($query, '__toString')) { |
| 244 | 244 | throw new InvalidArgumentException('Uri query must be a string'); |
| 245 | 245 | } |
| 246 | - $query = ltrim((string)$query, '?'); |
|
| 246 | + $query = ltrim((string) $query, '?'); |
|
| 247 | 247 | $clone = clone $this; |
| 248 | 248 | $clone->query = $this->filterQuery($query); |
| 249 | 249 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | if (!is_string($fragment) && !method_exists($fragment, '__toString')) { |
| 259 | 259 | throw new InvalidArgumentException('Uri fragment must be a string'); |
| 260 | 260 | } |
| 261 | - $fragment = ltrim((string)$fragment, '#'); |
|
| 261 | + $fragment = ltrim((string) $fragment, '#'); |
|
| 262 | 262 | $clone = clone $this; |
| 263 | 263 | $clone->fragment = $this->filterQuery($fragment); |
| 264 | 264 | |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | { |
| 344 | 344 | return preg_replace_callback( |
| 345 | 345 | '/(?:[^a-zA-Z0-9_\-\.~:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/', |
| 346 | - function ($match) { |
|
| 346 | + function($match) { |
|
| 347 | 347 | return rawurlencode($match[0]); |
| 348 | 348 | }, |
| 349 | 349 | $path |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | { |
| 362 | 362 | return preg_replace_callback( |
| 363 | 363 | '/(?:[^a-zA-Z0-9_\-\.~!\$&\'\(\)\*\+,;=%:@\/\?]+|%(?![A-Fa-f0-9]{2}))/', |
| 364 | - function ($match) { |
|
| 364 | + function($match) { |
|
| 365 | 365 | return rawurlencode($match[0]); |
| 366 | 366 | }, |
| 367 | 367 | $query |