@@ -115,7 +115,7 @@ |
||
| 115 | 115 | $sep = '?'; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - $buster = $this->getCacheBuster($route->dir, $file); |
|
| 118 | + $buster = $this->getCacheBuster($route->dir, $file); |
|
| 119 | 119 | |
| 120 | 120 | if (!empty($buster)) { |
| 121 | 121 | $path .= $sep . 'v=' . $buster; |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | |
| 116 | 116 | protected function registerServerRequest(): void |
| 117 | 117 | { |
| 118 | - $this->registry->add(ServerRequestInterface::class, function (): ServerRequestInterface { |
|
| 118 | + $this->registry->add(ServerRequestInterface::class, function(): ServerRequestInterface { |
|
| 119 | 119 | try { |
| 120 | 120 | $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); |
| 121 | 121 | $creator = new \Nyholm\Psr7Server\ServerRequestCreator( |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | /** @psalm-suppress UnsafeInstantiation */ |
| 19 | 19 | $exception = new static(); |
| 20 | - $exception->subTitle = $subTitle; |
|
| 20 | + $exception->subTitle = $subTitle; |
|
| 21 | 21 | |
| 22 | 22 | return $exception; |
| 23 | 23 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | if ($handler instanceof MiddlewareInterface) { |
| 45 | 45 | return $handler( |
| 46 | 46 | $request, |
| 47 | - function ( |
|
| 47 | + function( |
|
| 48 | 48 | Request $req |
| 49 | 49 | ) use ($queue): Response { |
| 50 | 50 | return $this->handle( |
@@ -92,8 +92,7 @@ |
||
| 92 | 92 | // If $paramName is emtpy an existing unbound entry should |
| 93 | 93 | // be found on first try. |
| 94 | 94 | return isset($this->entries[$id . $paramName]) ? |
| 95 | - $this->resolve($id . $paramName, $args) : |
|
| 96 | - $this->resolve($id, $args); |
|
| 95 | + $this->resolve($id . $paramName, $args) : $this->resolve($id, $args); |
|
| 97 | 96 | } |
| 98 | 97 | |
| 99 | 98 | protected function resolveEntry(Entry $entry, array $args = null): object |
@@ -165,11 +165,9 @@ discard block |
||
| 165 | 165 | try { |
| 166 | 166 | $args[$name] = match ((string)$param->getType()) { |
| 167 | 167 | 'int' => is_numeric($this->routeArgs[$name]) ? |
| 168 | - (int)$this->routeArgs[$name] : |
|
| 169 | - throw new RuntimeException($errMsg . "Cannot cast '$name' to int"), |
|
| 168 | + (int)$this->routeArgs[$name] : throw new RuntimeException($errMsg . "Cannot cast '$name' to int"), |
|
| 170 | 169 | 'float' => is_numeric($this->routeArgs[$name]) ? |
| 171 | - (float)$this->routeArgs[$name] : |
|
| 172 | - throw new RuntimeException($errMsg . "Cannot cast '$name' to float"), |
|
| 170 | + (float)$this->routeArgs[$name] : throw new RuntimeException($errMsg . "Cannot cast '$name' to float"), |
|
| 173 | 171 | 'string' => $this->routeArgs[$name], |
| 174 | 172 | default => $this->registry->resolveParam($param), |
| 175 | 173 | }; |
@@ -212,13 +210,13 @@ discard block |
||
| 212 | 210 | |
| 213 | 211 | /** @psalm-suppress RedundantPropertyInitializationCheck */ |
| 214 | 212 | if (!isset($this->attributes)) { |
| 215 | - $this->attributes = array_map(function ($attribute) { |
|
| 213 | + $this->attributes = array_map(function($attribute) { |
|
| 216 | 214 | return $attribute->newInstance(); |
| 217 | 215 | }, $reflector->getAttributes()); |
| 218 | 216 | } |
| 219 | 217 | |
| 220 | 218 | if ($filter) { |
| 221 | - return array_filter($this->attributes, function ($attribute) use ($filter) { |
|
| 219 | + return array_filter($this->attributes, function($attribute) use ($filter) { |
|
| 222 | 220 | return $attribute instanceof $filter; |
| 223 | 221 | }); |
| 224 | 222 | } |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public static function encode( |
| 10 | 10 | mixed $data, |
| 11 | - int $flags = JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR |
|
| 11 | + int $flags = JSON_UNESCAPED_SLASHES|JSON_THROW_ON_ERROR |
|
| 12 | 12 | ): string { |
| 13 | 13 | if ($data instanceof \Traversable) { |
| 14 | 14 | return json_encode(iterator_to_array($data), $flags); |