@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | */ |
| 260 | 260 | public function redirect($from, $to, $status = 302) |
| 261 | 261 | { |
| 262 | - $handler = function ($request, ResponseInterface $response) use ($to, $status) { |
|
| 262 | + $handler = function($request, ResponseInterface $response) use ($to, $status) { |
|
| 263 | 263 | return $response->withHeader('Location', (string)$to)->withStatus($status); |
| 264 | 264 | }; |
| 265 | 265 | |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | $router = $this->container->get('router'); |
| 506 | 506 | |
| 507 | 507 | // If router hasn't been dispatched or the URI changed then dispatch |
| 508 | - if (null === $routeInfo || ($routeInfo['request'] !== [$request->getMethod(), (string) $request->getUri()])) { |
|
| 508 | + if (null === $routeInfo || ($routeInfo['request'] !== [$request->getMethod(), (string)$request->getUri()])) { |
|
| 509 | 509 | $request = $this->dispatchRouterAndPrepareRoute($request, $router); |
| 510 | 510 | $routeInfo = $request->getAttribute('routeInfo'); |
| 511 | 511 | } |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | $request = $request->withAttribute('route', $route); |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | - $routeInfo['request'] = [$request->getMethod(), (string) $request->getUri()]; |
|
| 600 | + $routeInfo['request'] = [$request->getMethod(), (string)$request->getUri()]; |
|
| 601 | 601 | |
| 602 | 602 | return $request->withAttribute('routeInfo', $routeInfo); |
| 603 | 603 | } |
@@ -626,7 +626,7 @@ discard block |
||
| 626 | 626 | } |
| 627 | 627 | $size = $response->getBody()->getSize(); |
| 628 | 628 | if ($size !== null && !$response->hasHeader('Content-Length')) { |
| 629 | - $response = $response->withHeader('Content-Length', (string) $size); |
|
| 629 | + $response = $response->withHeader('Content-Length', (string)$size); |
|
| 630 | 630 | } |
| 631 | 631 | } |
| 632 | 632 | |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | $routes = $router->getRoutes(); |
| 733 | 733 | /** @var Route $route */ |
| 734 | 734 | foreach ($routes as $route) { |
| 735 | - $intersection = \array_intersect($methods,$route->getMethods()); |
|
| 735 | + $intersection = \array_intersect($methods, $route->getMethods()); |
|
| 736 | 736 | $intersectionSize = \count($intersection); |
| 737 | 737 | if (\count($methods) === 0 || $intersectionSize > 0) { |
| 738 | 738 | $pattern[] = $route->getPattern(); |