@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | $promise = new FulfilledPromise(); |
29 | 29 | |
30 | - return new PromiseResponse($promise->then(function () use ($handler, $request) { |
|
30 | + return new PromiseResponse($promise->then(function() use ($handler, $request) { |
|
31 | 31 | try { |
32 | 32 | return $handler->handle($request); |
33 | 33 | } catch (Throwable $exception) { |
@@ -25,13 +25,13 @@ |
||
25 | 25 | { |
26 | 26 | $promise = new FulfilledPromise(); |
27 | 27 | |
28 | - return new PromiseResponse($promise->then(function () use ($request, $handler) { |
|
28 | + return new PromiseResponse($promise->then(function() use ($request, $handler) { |
|
29 | 29 | $this->logger->debug(\json_encode([ |
30 | 30 | 'method' => $request->getMethod(), |
31 | 31 | 'target' => $request->getRequestTarget(), |
32 | 32 | 'headers' => $request->getHeaders(), |
33 | 33 | 'query-string' => $request->getQueryParams(), |
34 | - 'body' => (string)$request->getBody() |
|
34 | + 'body' => (string) $request->getBody() |
|
35 | 35 | ])); |
36 | 36 | |
37 | 37 | return $handler->handle($request); |
@@ -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,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 | } |
@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | |
24 | 24 | public function __construct(bool $debug) |
25 | 25 | { |
26 | - $this->debug = false;//$debug; |
|
26 | + $this->debug = false; //$debug; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
30 | 30 | { |
31 | 31 | $promise = new FulfilledPromise(); |
32 | 32 | |
33 | - return new PromiseResponse($promise->then(function () use ($request, $handler) { |
|
33 | + return new PromiseResponse($promise->then(function() use ($request, $handler) { |
|
34 | 34 | $this->setErrorHandler(); |
35 | 35 | try { |
36 | 36 | if ($this->debug && class_exists(WhoopsMiddleware::class)) { |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | |
53 | 53 | private function setErrorHandler(): void |
54 | 54 | { |
55 | - $handler = static function ( |
|
55 | + $handler = static function( |
|
56 | 56 | int $errorNumber, |
57 | 57 | string $errorString, |
58 | 58 | string $errorFile, |
59 | 59 | int $errorLine, |
60 | 60 | ?array $errorContext |
61 | 61 | ): bool { |
62 | - if (! (error_reporting() & $errorNumber)) { |
|
62 | + if (!(error_reporting() & $errorNumber)) { |
|
63 | 63 | return false; |
64 | 64 | } |
65 | 65 | throw new ErrorException($errorString, 0, $errorNumber, $errorFile, $errorLine); |