Passed
Push — main ( af6a91...92bf86 )
by Thomas
03:24
created
src/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.