Passed
Push — master ( 5eb5e7...fcf200 )
by Nícollas
04:19 queued 02:01
created
src/Router/Middlewares/MiddlewareCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         $middlewares = $this->middlewares;
127 127
 
128
-        if(is_string($middlewares)) {
128
+        if (is_string($middlewares)) {
129 129
             $middlewares = explode(',', $middlewares);
130 130
         }
131 131
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     protected function resolveNestedMiddleware(Array $middlewares): void
146 146
     {
147
-        $this->queue = array_map(function ($middleware) {
147
+        $this->queue = array_map(function($middleware) {
148 148
             $middleware = trim(rtrim($middleware));
149 149
 
150 150
             return $this->instanceMiddleware($middleware);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
         return $currentMiddleware->handle(
243 243
             $this->currentRequest,
244
-            fn () => $this->next()
244
+            fn() => $this->next()
245 245
         );
246 246
     }
247 247
 }
Please login to merge, or discard this patch.
src/Http/Request.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,9 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $parsedRoute = parse_url($this->fullUrl ?? "/");
71 71
 
72
-        if (empty($data)) return $parsedRoute;
72
+        if (empty($data)) {
73
+            return $parsedRoute;
74
+        }
73 75
 
74 76
         if (isset($parsedRoute[$data])) {
75 77
             return $parsedRoute[$data];
@@ -101,7 +103,9 @@  discard block
 block discarded – undo
101 103
     {
102 104
         $path = $this->getParsedRoute();
103 105
 
104
-        if (!$path) return null;
106
+        if (!$path) {
107
+            return null;
108
+        }
105 109
 
106 110
         return "{$path['scheme']}://{$path['host']}{$this->path()}";
107 111
     }
@@ -196,7 +200,9 @@  discard block
 block discarded – undo
196 200
 
197 201
         if (!empty($diff)) {
198 202
             foreach ($routeParams as $index => $param) {
199
-                if (!isset($diff[$index])) return;
203
+                if (!isset($diff[$index])) {
204
+                    return;
205
+                }
200 206
 
201 207
                 if ($this->httpMethod != 'GET') {
202 208
                     $this->params[$param] = rawurldecode($diff[$index]);
@@ -298,7 +304,9 @@  discard block
 block discarded – undo
298 304
         }, $except);
299 305
 
300 306
         foreach ($except as $excession) {
301
-            if (!isset($this->data[$excession])) return;
307
+            if (!isset($this->data[$excession])) {
308
+                return;
309
+            }
302 310
 
303 311
             unset($allWithExcession[$excession]);
304 312
         }
@@ -374,7 +382,9 @@  discard block
 block discarded – undo
374 382
     {
375 383
         $authorizationHeader = $this->header('Authorization');
376 384
 
377
-        if (!$authorizationHeader) return null;
385
+        if (!$authorizationHeader) {
386
+            return null;
387
+        }
378 388
 
379 389
         if (preg_match("/^Bearer\s(.*)+$/", $authorizationHeader, $found)) {
380 390
             return $authorizationHeader;
Please login to merge, or discard this patch.