Passed
Branch master (79a4f3)
by Koldo
04:59
created
Category
src/Middleware/ExceptionLoggerMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Middleware/ErrorMiddleware.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,12 +28,12 @@  discard block
 block discarded – undo
28 28
 
29 29
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
30 30
     {
31
-        $promise = new Promise(function ($resolver, $canceller) {
31
+        $promise = new Promise(function($resolver, $canceller) {
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Middleware/RequestLoggerMiddleware.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.