Passed
Push — main ( f41f09...08852a )
by Thomas
02:36
created
src/View.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
         $reflector = new ReflectionFunction($this->closure);
128 128
 
129 129
         if (!isset($this->attributes)) {
130
-            $this->attributes = array_map(function ($attribute) {
130
+            $this->attributes = array_map(function($attribute) {
131 131
                 return $this->newAttributeInstance($attribute);
132 132
             }, $reflector->getAttributes());
133 133
         }
134 134
 
135 135
         if ($filter) {
136
-            return array_filter($this->attributes, function ($attribute) use ($filter) {
136
+            return array_filter($this->attributes, function($attribute) use ($filter) {
137 137
                 return $attribute instanceof $filter;
138 138
             });
139 139
         }
@@ -238,11 +238,9 @@  discard block
 block discarded – undo
238 238
             try {
239 239
                 $args[$name] = match ((string)$param->getType()) {
240 240
                     'int' => is_numeric($this->routeArgs[$name]) ?
241
-                        (int)$this->routeArgs[$name] :
242
-                        throw new RuntimeException($errMsg . "Cannot cast '{$name}' to int"),
241
+                        (int)$this->routeArgs[$name] : throw new RuntimeException($errMsg . "Cannot cast '{$name}' to int"),
243 242
                     'float' => is_numeric($this->routeArgs[$name]) ?
244
-                        (float)$this->routeArgs[$name] :
245
-                        throw new RuntimeException($errMsg . "Cannot cast '{$name}' to float"),
243
+                        (float)$this->routeArgs[$name] : throw new RuntimeException($errMsg . "Cannot cast '{$name}' to float"),
246 244
                     'string' => $this->routeArgs[$name],
247 245
                     default => (new Resolver($this->registry))->resolveParam($param),
248 246
                 };
Please login to merge, or discard this patch.