@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | $promise = new FulfilledPromise(); |
| 20 | 20 | |
| 21 | - return new PromiseResponse($promise->then(function () { |
|
| 21 | + return new PromiseResponse($promise->then(function() { |
|
| 22 | 22 | return new HtmlResponse('<html><head></head><body>Page not found</body></html>', 404); |
| 23 | 23 | })); |
| 24 | 24 | } |
@@ -28,12 +28,12 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
| 30 | 30 | { |
| 31 | - $promise = new Promise(function ($resolver) { |
|
| 31 | + $promise = new Promise(function($resolver) { |
|
| 32 | 32 | $this->setErrorHandler(); |
| 33 | 33 | $resolver(); |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | - return new PromiseResponse($promise->then(function () use ($request, $handler) { |
|
| 36 | + return new PromiseResponse($promise->then(function() use ($request, $handler) { |
|
| 37 | 37 | try { |
| 38 | 38 | if ($this->debug && class_exists(WhoopsMiddleware::class)) { |
| 39 | 39 | $whoopsMiddleware = new WhoopsMiddleware(); |
@@ -49,14 +49,14 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | private function setErrorHandler(): void |
| 51 | 51 | { |
| 52 | - $handler = static function ( |
|
| 52 | + $handler = static function( |
|
| 53 | 53 | int $errorNumber, |
| 54 | 54 | string $errorString, |
| 55 | 55 | string $errorFile, |
| 56 | 56 | int $errorLine, |
| 57 | 57 | ?array $errorContext |
| 58 | 58 | ): bool { |
| 59 | - if (! (error_reporting() & $errorNumber)) { |
|
| 59 | + if (!(error_reporting() & $errorNumber)) { |
|
| 60 | 60 | // Error is not in mask |
| 61 | 61 | return false; |
| 62 | 62 | } |
@@ -28,10 +28,10 @@ |
||
| 28 | 28 | |
| 29 | 29 | return new PromiseResponse( |
| 30 | 30 | $promise |
| 31 | - ->then(function () use ($request) { |
|
| 31 | + ->then(function() use ($request) { |
|
| 32 | 32 | return $this->router->match($request); |
| 33 | 33 | }) |
| 34 | - ->then(static function (PipedRouteMiddleware $route) use ($request, $handler) { |
|
| 34 | + ->then(static function(PipedRouteMiddleware $route) use ($request, $handler) { |
|
| 35 | 35 | if (true === $route->isFail()) { |
| 36 | 36 | return $handler->handle($request); |
| 37 | 37 | } |