@@ -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; |
@@ -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( |
@@ -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); |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | $registry->addAnyway(ResponseFactoryInterface::class, \Nyholm\Psr7\Factory\Psr17Factory::class); |
| 121 | 121 | $registry->addAnyway(StreamFactoryInterface::class, \Nyholm\Psr7\Factory\Psr17Factory::class); |
| 122 | 122 | $registry->addAnyway(ResponseFactory::class, new ResponseFactory($this->registry)); |
| 123 | - $registry->addAnyway(ServerRequestInterface::class, function (): ServerRequestInterface { |
|
| 123 | + $registry->addAnyway(ServerRequestInterface::class, function(): ServerRequestInterface { |
|
| 124 | 124 | try { |
| 125 | 125 | $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); |
| 126 | 126 | $creator = new \Nyholm\Psr7Server\ServerRequestCreator( |
@@ -180,8 +180,7 @@ |
||
| 180 | 180 | // If $paramName is emtpy an existing unbound entry should |
| 181 | 181 | // be found on first try. |
| 182 | 182 | return isset($this->entries[$id . $paramName]) ? |
| 183 | - $this->resolveEntry($this->entries[$id . $paramName]) : |
|
| 184 | - $this->get($id); |
|
| 183 | + $this->resolveEntry($this->entries[$id . $paramName]) : $this->get($id); |
|
| 185 | 184 | } |
| 186 | 185 | |
| 187 | 186 | public function resolveParam(ReflectionParameter $param): mixed |