@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | |
246 | 246 | if ($args[0] instanceof Closure) { |
247 | - $args[0] = $args[0] = function ($q) use ($args): void { |
|
247 | + $args[0] = $args[0] = function($q) use ($args): void { |
|
248 | 248 | $args[0]($this->withQuery($q)); |
249 | 249 | }; |
250 | 250 | } |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | if ($value instanceof Closure) { |
268 | - $value = function ($q) use ($value): void { |
|
268 | + $value = function($q) use ($value): void { |
|
269 | 269 | $value($this->withQuery($q)); |
270 | 270 | }; |
271 | 271 | } |
@@ -243,7 +243,7 @@ |
||
243 | 243 | |
244 | 244 | public function mergeInheritanceNodes(bool $includeRole = false): void |
245 | 245 | { |
246 | - $this->mergeParent?->mergeInheritanceNodes(); |
|
246 | + $this->mergeParent ? ->mergeInheritanceNodes(); |
|
247 | 247 | foreach ($this->mergeSubclass as $subclassNode) { |
248 | 248 | $subclassNode->mergeInheritanceNodes($includeRole); |
249 | 249 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | */ |
75 | 75 | private function castPrimitive(mixed $rule, mixed $value): mixed |
76 | 76 | { |
77 | - return match ($rule) { |
|
77 | + return match($rule) { |
|
78 | 78 | 'int' => (int)$value, |
79 | 79 | 'bool' => (bool)$value, |
80 | 80 | 'float' => (float)$value, |
@@ -98,7 +98,7 @@ |
||
98 | 98 | { |
99 | 99 | $depth = \count($this->indexes[$indexName]); |
100 | 100 | |
101 | - $iterator = static function (array $data, $deep) use (&$depth, &$iterator) { |
|
101 | + $iterator = static function(array $data, $deep) use (&$depth, &$iterator) { |
|
102 | 102 | if ($deep < $depth) { |
103 | 103 | ++$deep; |
104 | 104 | foreach ($data as $subset) { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $this->appendix = []; |
51 | 51 | } |
52 | 52 | $data = $this->state->getData(); |
53 | - return array_merge($this->columns, $this->mapper?->mapColumns($data) ?? $data); |
|
53 | + return array_merge($this->columns, $this->mapper ? ->mapColumns($data) ?? $data); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -70,7 +70,7 @@ |
||
70 | 70 | |
71 | 71 | return array_merge( |
72 | 72 | $this->columns, |
73 | - $this->mapper?->mapColumns($data) ?? $data |
|
73 | + $this->mapper ? ->mapColumns($data) ?? $data |
|
74 | 74 | ); |
75 | 75 | } |
76 | 76 |
@@ -109,6 +109,4 @@ |
||
109 | 109 | } |
110 | 110 | PHP; |
111 | 111 | eval($classStr); |
112 | - return $class; |
|
113 | - } |
|
114 | -} |
|
112 | + return $class |
|
115 | 113 | \ No newline at end of file |
@@ -65,7 +65,7 @@ |
||
65 | 65 | $this->findAllInstanceProperties($class->getParentClass() ?: null), // of course PHP is shit. |
66 | 66 | array_filter( |
67 | 67 | $class->getProperties(), |
68 | - static function (ReflectionProperty $property): bool { |
|
68 | + static function(ReflectionProperty $property): bool { |
|
69 | 69 | return !$property->isStatic(); |
70 | 70 | } |
71 | 71 | ) |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | continue; |
49 | 49 | } |
50 | 50 | |
51 | - Closure::bind(static function (object $object, array $props, array &$data): void { |
|
51 | + Closure::bind(static function(object $object, array $props, array &$data): void { |
|
52 | 52 | foreach ($props as $property) { |
53 | 53 | if (!array_key_exists($property, $data)) { |
54 | 54 | continue; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | continue; |
74 | 74 | } |
75 | 75 | |
76 | - Closure::bind(static function (object $object, array $props, array &$data) use ($refl, $relMap): void { |
|
76 | + Closure::bind(static function(object $object, array $props, array &$data) use ($refl, $relMap): void { |
|
77 | 77 | foreach ($props as $property) { |
78 | 78 | if (!\array_key_exists($property, $data)) { |
79 | 79 | continue; |