@@ -138,8 +138,7 @@ discard block |
||
| 138 | 138 | $this->addMiddlewareChain($handler, $container, $globalMiddleware, $routeMiddleware) : $handler; |
| 139 | 139 | |
| 140 | 140 | $request = $requestFactory === null && $hasMiddleware === false && $matchCode === RouterInterface::MATCH_FOUND ? |
| 141 | - null : |
|
| 142 | - $this->createRequest($this->sapi, $container, $requestFactory ?? static::getDefaultRequestFactory()); |
|
| 141 | + null : $this->createRequest($this->sapi, $container, $requestFactory ?? static::getDefaultRequestFactory()); |
|
| 143 | 142 | |
| 144 | 143 | // Execute the pipeline by sending `Request` down all middleware (global then route's then |
| 145 | 144 | // terminal handler in `Controller` and back) and then send `Response` to SAPI |
@@ -347,7 +346,7 @@ discard block |
||
| 347 | 346 | array $handlerParams, |
| 348 | 347 | PsrContainerInterface $container |
| 349 | 348 | ): Closure { |
| 350 | - return function (ServerRequestInterface $request = null) use ($handler, $handlerParams, $container) { |
|
| 349 | + return function(ServerRequestInterface $request = null) use ($handler, $handlerParams, $container) { |
|
| 351 | 350 | return $this->callHandler($handler, $handlerParams, $container, $request); |
| 352 | 351 | }; |
| 353 | 352 | } |
@@ -360,7 +359,7 @@ discard block |
||
| 360 | 359 | private function createMethodNotAllowedTerminalHandler(array $allowedMethods): Closure |
| 361 | 360 | { |
| 362 | 361 | // 405 Method Not Allowed |
| 363 | - return function () use ($allowedMethods) { |
|
| 362 | + return function() use ($allowedMethods) { |
|
| 364 | 363 | return $this->createEmptyResponse(405, ['Accept' => implode(',', $allowedMethods)]); |
| 365 | 364 | }; |
| 366 | 365 | } |
@@ -371,7 +370,7 @@ discard block |
||
| 371 | 370 | private function createNotFoundTerminalHandler(): Closure |
| 372 | 371 | { |
| 373 | 372 | // 404 Not Found |
| 374 | - return function () { |
|
| 373 | + return function() { |
|
| 375 | 374 | return $this->createEmptyResponse(404); |
| 376 | 375 | }; |
| 377 | 376 | } |
@@ -419,7 +418,7 @@ discard block |
||
| 419 | 418 | '`public static methodName(ServerRequestInterface, Closure, PsrContainerInterface): ResponseInterface`' |
| 420 | 419 | ); |
| 421 | 420 | |
| 422 | - return function (ServerRequestInterface $request) use ($next, $middleware, $container): ResponseInterface { |
|
| 421 | + return function(ServerRequestInterface $request) use ($next, $middleware, $container): ResponseInterface { |
|
| 423 | 422 | return call_user_func($middleware, $request, $next, $container); |
| 424 | 423 | }; |
| 425 | 424 | } |