Passed
Push — main ( 4ecd3e...15b7a1 )
by Thomas
13:49
created
src/Http/View.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -114,14 +114,14 @@  discard block
 block discarded – undo
114 114
         $reflector = new ReflectionFunction($this->closure);
115 115
 
116 116
         if (!isset($this->attributes)) {
117
-            $this->attributes = array_map(function ($attribute) {
117
+            $this->attributes = array_map(function($attribute) {
118 118
                 return $this->newAttributeInstance($attribute);
119 119
             }, $reflector->getAttributes());
120 120
         }
121 121
 
122 122
         if ($filter) {
123 123
             return array_values(
124
-                array_filter($this->attributes, function ($attribute) use ($filter) {
124
+                array_filter($this->attributes, function($attribute) use ($filter) {
125 125
                     return $attribute instanceof $filter;
126 126
                 })
127 127
             );
@@ -230,11 +230,9 @@  discard block
 block discarded – undo
230 230
             try {
231 231
                 $args[$name] = match ((string)$param->getType()) {
232 232
                     'int' => is_numeric($this->routeArgs[$name]) ?
233
-                        (int)$this->routeArgs[$name] :
234
-                        throw new RuntimeException($errMsg . "Cannot cast '{$name}' to int"),
233
+                        (int)$this->routeArgs[$name] : throw new RuntimeException($errMsg . "Cannot cast '{$name}' to int"),
235 234
                     'float' => is_numeric($this->routeArgs[$name]) ?
236
-                        (float)$this->routeArgs[$name] :
237
-                        throw new RuntimeException($errMsg . "Cannot cast '{$name}' to float"),
235
+                        (float)$this->routeArgs[$name] : throw new RuntimeException($errMsg . "Cannot cast '{$name}' to float"),
238 236
                     'string' => $this->routeArgs[$name],
239 237
                     default => (new Resolver($this->registry))->resolveParam($param),
240 238
                 };
Please login to merge, or discard this patch.
src/Renderer/JsonRenderer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
     public function render(mixed $data, mixed ...$args): string
18 18
     {
19
-        $flags = JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR;
19
+        $flags = JSON_UNESCAPED_SLASHES|JSON_THROW_ON_ERROR;
20 20
 
21 21
         if (count($args) > 0) {
22 22
             /** @var mixed */
Please login to merge, or discard this patch.
src/Di/Resolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
         if ($type instanceof ReflectionNamedType) {
90 90
             try {
91 91
                 return $this->registry->get(ltrim($type->getName(), '?'));
92
-            } catch (NotFoundException | ContainerException  $e) {
92
+            } catch (NotFoundException|ContainerException  $e) {
93 93
                 if ($param->isDefaultValueAvailable()) {
94 94
                     return $param->getDefaultValue();
95 95
                 }
Please login to merge, or discard this patch.
src/Http/Dispatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         if ($handler instanceof Middleware) {
40 40
             return $handler(
41 41
                 $request,
42
-                function (Request $req) use ($queue): Response {
42
+                function(Request $req) use ($queue): Response {
43 43
                     return new Response($this->handle(array_slice($queue, 1), $req), $this->factory);
44 44
                 }
45 45
             )->psr();
Please login to merge, or discard this patch.
src/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
         mixed $data,
176 176
         int $code = 200,
177 177
         string $reasonPhrase = '',
178
-        int $flags = JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR,
178
+        int $flags = JSON_UNESCAPED_SLASHES|JSON_THROW_ON_ERROR,
179 179
     ): static {
180 180
         if ($data instanceof Traversable) {
181 181
             $body = json_encode(iterator_to_array($data), $flags);
Please login to merge, or discard this patch.
src/Di/Inject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 use Conia\Chuck\Exception\RuntimeException;
9 9
 
10 10
 /** @psalm-api */
11
-#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_FUNCTION | Attribute::TARGET_METHOD)]
11
+#[Attribute(Attribute::IS_REPEATABLE|Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD)]
12 12
 class Inject
13 13
 {
14 14
     public array $args;
Please login to merge, or discard this patch.
src/Di/Call.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 use Conia\Chuck\Exception\RuntimeException;
9 9
 
10 10
 /** @psalm-api */
11
-#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
11
+#[Attribute(Attribute::IS_REPEATABLE|Attribute::TARGET_CLASS)]
12 12
 class Call
13 13
 {
14 14
     public array $args;
Please login to merge, or discard this patch.
src/Routing/AddsMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     /** @psalm-param non-falsy-string|list{non-falsy-string, ...}|Closure|Middleware|PsrMiddleware ...$middleware */
17 17
     public function middleware(string|array|Closure|Middleware|PsrMiddleware ...$middleware): static
18 18
     {
19
-        $this->middleware = array_merge($this->middleware, array_map(function ($mw) {
19
+        $this->middleware = array_merge($this->middleware, array_map(function($mw) {
20 20
             if (is_string($mw)) {
21 21
                 return [$mw];
22 22
             }
Please login to merge, or discard this patch.
src/Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
 
235 235
         return array_map(
236 236
             /** @psalm-param list{non-falsy-string, ...}|Closure|Middleware|PsrMiddleware $middleware */
237
-            function (
237
+            function(
238 238
                 array|Closure|Middleware|PsrMiddleware $middleware
239 239
             ) use ($registry): Middleware|PsrMiddleware {
240 240
                 if (
Please login to merge, or discard this patch.