Passed
Push — main ( 269aa4...b92cd4 )
by Thomas
02:45
created
src/View.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
         $reflector = new ReflectionFunction($this->closure);
130 130
 
131 131
         if (!isset($this->attributes)) {
132
-            $this->attributes = array_map(function ($attribute) {
132
+            $this->attributes = array_map(function($attribute) {
133 133
                 return $attribute->newInstance();
134 134
             }, $reflector->getAttributes());
135 135
         }
136 136
 
137 137
         if ($filter) {
138
-            return array_filter($this->attributes, function ($attribute) use ($filter) {
138
+            return array_filter($this->attributes, function($attribute) use ($filter) {
139 139
                 return $attribute instanceof $filter;
140 140
             });
141 141
         }
@@ -200,11 +200,9 @@  discard block
 block discarded – undo
200 200
             try {
201 201
                 $args[$name] = match ((string)$param->getType()) {
202 202
                     'int' => is_numeric($this->routeArgs[$name]) ?
203
-                        (int)$this->routeArgs[$name] :
204
-                        throw new RuntimeException($errMsg . "Cannot cast '{$name}' to int"),
203
+                        (int)$this->routeArgs[$name] : throw new RuntimeException($errMsg . "Cannot cast '{$name}' to int"),
205 204
                     'float' => is_numeric($this->routeArgs[$name]) ?
206
-                        (float)$this->routeArgs[$name] :
207
-                        throw new RuntimeException($errMsg . "Cannot cast '{$name}' to float"),
205
+                        (float)$this->routeArgs[$name] : throw new RuntimeException($errMsg . "Cannot cast '{$name}' to float"),
208 206
                     'string' => $this->routeArgs[$name],
209 207
                     default => $this->registry->resolveParam($param),
210 208
                 };
Please login to merge, or discard this patch.