@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | /** |
| 349 | 349 | * @phpstan-return \Generator<TKey,T> $generator |
| 350 | 350 | */ |
| 351 | - $generator = function () use ($key, $value): \Generator { |
|
| 351 | + $generator = function() use ($key, $value): \Generator { |
|
| 352 | 352 | if ($this->properties !== []) { |
| 353 | 353 | $this->checkType($key, $value); |
| 354 | 354 | } |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | |
| 538 | 538 | /** @phpstan-var \Arrayy\ArrayyRewindableGenerator<TKey,T> */ |
| 539 | 539 | $generatorTmp = new ArrayyRewindableExtendedGenerator( |
| 540 | - static function () use ($generator): \Generator { |
|
| 540 | + static function() use ($generator): \Generator { |
|
| 541 | 541 | yield from $generator; |
| 542 | 542 | }, |
| 543 | 543 | null, |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | */ |
| 750 | 750 | $this->callAtPath( |
| 751 | 751 | $containerPath, |
| 752 | - static function ($container) use ($lastOffset, &$offsetExists) { |
|
| 752 | + static function($container) use ($lastOffset, &$offsetExists) { |
|
| 753 | 753 | $offsetExists = \array_key_exists($lastOffset, $container); |
| 754 | 754 | } |
| 755 | 755 | ); |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | */ |
| 858 | 858 | $this->callAtPath( |
| 859 | 859 | \implode($this->pathSeparator, $path), |
| 860 | - static function (&$offset) use ($pathToUnset) { |
|
| 860 | + static function(&$offset) use ($pathToUnset) { |
|
| 861 | 861 | if (\is_array($offset)) { |
| 862 | 862 | unset($offset[$pathToUnset]); |
| 863 | 863 | } else { |
@@ -913,7 +913,7 @@ discard block |
||
| 913 | 913 | |
| 914 | 914 | if (\strpos($iteratorClass, '\\') === 0) { |
| 915 | 915 | /** @var class-string<\Arrayy\ArrayyIterator<TKey,T>> $iteratorClass */ |
| 916 | - $iteratorClass = '\\' . $iteratorClass; |
|
| 916 | + $iteratorClass = '\\'.$iteratorClass; |
|
| 917 | 917 | if (\class_exists($iteratorClass)) { |
| 918 | 918 | /** |
| 919 | 919 | * @psalm-suppress PropertyTypeCoercion |
@@ -924,7 +924,7 @@ discard block |
||
| 924 | 924 | } |
| 925 | 925 | } |
| 926 | 926 | |
| 927 | - throw new \InvalidArgumentException('The iterator class does not exist: ' . $iteratorClass); |
|
| 927 | + throw new \InvalidArgumentException('The iterator class does not exist: '.$iteratorClass); |
|
| 928 | 928 | } |
| 929 | 929 | |
| 930 | 930 | /** |
@@ -1106,13 +1106,13 @@ discard block |
||
| 1106 | 1106 | |
| 1107 | 1107 | foreach ($this->getGenerator() as $key => $item) { |
| 1108 | 1108 | if ($item instanceof self) { |
| 1109 | - $result[$prefix . $key] = $item->appendToEachKey($prefix); |
|
| 1109 | + $result[$prefix.$key] = $item->appendToEachKey($prefix); |
|
| 1110 | 1110 | } elseif (\is_array($item)) { |
| 1111 | - $result[$prefix . $key] = self::create($item, $this->iteratorClass, false) |
|
| 1111 | + $result[$prefix.$key] = self::create($item, $this->iteratorClass, false) |
|
| 1112 | 1112 | ->appendToEachKey($prefix) |
| 1113 | 1113 | ->toArray(); |
| 1114 | 1114 | } else { |
| 1115 | - $result[$prefix . $key] = $item; |
|
| 1115 | + $result[$prefix.$key] = $item; |
|
| 1116 | 1116 | } |
| 1117 | 1117 | } |
| 1118 | 1118 | |
@@ -1147,7 +1147,7 @@ discard block |
||
| 1147 | 1147 | } elseif (\is_object($item) === true) { |
| 1148 | 1148 | $result[$key] = $item; |
| 1149 | 1149 | } else { |
| 1150 | - $result[$key] = $prefix . $item; |
|
| 1150 | + $result[$key] = $prefix.$item; |
|
| 1151 | 1151 | } |
| 1152 | 1152 | } |
| 1153 | 1153 | |
@@ -1332,7 +1332,7 @@ discard block |
||
| 1332 | 1332 | public function chunk($size, $preserveKeys = false): self |
| 1333 | 1333 | { |
| 1334 | 1334 | if ($preserveKeys) { |
| 1335 | - $generator = function () use ($size) { |
|
| 1335 | + $generator = function() use ($size) { |
|
| 1336 | 1336 | $values = []; |
| 1337 | 1337 | $tmpCounter = 0; |
| 1338 | 1338 | foreach ($this->getGenerator() as $key => $value) { |
@@ -1352,7 +1352,7 @@ discard block |
||
| 1352 | 1352 | } |
| 1353 | 1353 | }; |
| 1354 | 1354 | } else { |
| 1355 | - $generator = function () use ($size) { |
|
| 1355 | + $generator = function() use ($size) { |
|
| 1356 | 1356 | $values = []; |
| 1357 | 1357 | $tmpCounter = 0; |
| 1358 | 1358 | foreach ($this->getGenerator() as $value) { |
@@ -1396,7 +1396,7 @@ discard block |
||
| 1396 | 1396 | public function clean(): self |
| 1397 | 1397 | { |
| 1398 | 1398 | return $this->filter( |
| 1399 | - static function ($value) { |
|
| 1399 | + static function($value) { |
|
| 1400 | 1400 | return (bool) $value; |
| 1401 | 1401 | } |
| 1402 | 1402 | ); |
@@ -1777,9 +1777,9 @@ discard block |
||
| 1777 | 1777 | |
| 1778 | 1778 | foreach ($items as $key => $value) { |
| 1779 | 1779 | if (\is_array($value) && $value !== []) { |
| 1780 | - $flatten[] = $this->flatten($delimiter, $prepend . $key . $delimiter, $value); |
|
| 1780 | + $flatten[] = $this->flatten($delimiter, $prepend.$key.$delimiter, $value); |
|
| 1781 | 1781 | } else { |
| 1782 | - $flatten[] = [$prepend . $key => $value]; |
|
| 1782 | + $flatten[] = [$prepend.$key => $value]; |
|
| 1783 | 1783 | } |
| 1784 | 1784 | } |
| 1785 | 1785 | |
@@ -1964,7 +1964,7 @@ discard block |
||
| 1964 | 1964 | */ |
| 1965 | 1965 | \array_walk( |
| 1966 | 1966 | $array, |
| 1967 | - static function (&$val) { |
|
| 1967 | + static function(&$val) { |
|
| 1968 | 1968 | if ((string) $val === $val) { |
| 1969 | 1969 | $val = \trim($val); |
| 1970 | 1970 | } |
@@ -2200,7 +2200,7 @@ discard block |
||
| 2200 | 2200 | $array = $array[0]; |
| 2201 | 2201 | } |
| 2202 | 2202 | |
| 2203 | - $generator = function () use ($array): \Generator { |
|
| 2203 | + $generator = function() use ($array): \Generator { |
|
| 2204 | 2204 | foreach ($this->getGenerator() as $key => $value) { |
| 2205 | 2205 | if (\in_array($value, $array, true) === false) { |
| 2206 | 2206 | yield $key => $value; |
@@ -2235,7 +2235,7 @@ discard block |
||
| 2235 | 2235 | $array = $array[0]; |
| 2236 | 2236 | } |
| 2237 | 2237 | |
| 2238 | - $generator = function () use ($array): \Generator { |
|
| 2238 | + $generator = function() use ($array): \Generator { |
|
| 2239 | 2239 | foreach ($this->getGenerator() as $key => $value) { |
| 2240 | 2240 | if (\array_key_exists($key, $array) === false) { |
| 2241 | 2241 | yield $key => $value; |
@@ -2270,7 +2270,7 @@ discard block |
||
| 2270 | 2270 | $array = $array[0]; |
| 2271 | 2271 | } |
| 2272 | 2272 | |
| 2273 | - $generator = function () use ($array): \Generator { |
|
| 2273 | + $generator = function() use ($array): \Generator { |
|
| 2274 | 2274 | foreach ($this->getGenerator() as $key => $value) { |
| 2275 | 2275 | $isset = isset($array[$key]); |
| 2276 | 2276 | |
@@ -2579,7 +2579,7 @@ discard block |
||
| 2579 | 2579 | } |
| 2580 | 2580 | |
| 2581 | 2581 | if ($flag === \ARRAY_FILTER_USE_KEY) { |
| 2582 | - $generator = function () use ($closure) { |
|
| 2582 | + $generator = function() use ($closure) { |
|
| 2583 | 2583 | foreach ($this->getGenerator() as $key => $value) { |
| 2584 | 2584 | if ($closure($key) === true) { |
| 2585 | 2585 | yield $key => $value; |
@@ -2591,7 +2591,7 @@ discard block |
||
| 2591 | 2591 | /** @phpstan-var \Closure(T,TKey):bool $closure */ |
| 2592 | 2592 | $closure = $closure; |
| 2593 | 2593 | |
| 2594 | - $generator = function () use ($closure) { |
|
| 2594 | + $generator = function() use ($closure) { |
|
| 2595 | 2595 | foreach ($this->getGenerator() as $key => $value) { |
| 2596 | 2596 | if ($closure($value, $key) === true) { |
| 2597 | 2597 | yield $key => $value; |
@@ -2599,7 +2599,7 @@ discard block |
||
| 2599 | 2599 | } |
| 2600 | 2600 | }; |
| 2601 | 2601 | } else { |
| 2602 | - $generator = function () use ($closure) { |
|
| 2602 | + $generator = function() use ($closure) { |
|
| 2603 | 2603 | foreach ($this->getGenerator() as $key => $value) { |
| 2604 | 2604 | if ($closure($value) === true) { |
| 2605 | 2605 | yield $key => $value; |
@@ -2655,40 +2655,40 @@ discard block |
||
| 2655 | 2655 | } |
| 2656 | 2656 | |
| 2657 | 2657 | $ops = [ |
| 2658 | - 'eq' => static function ($item, $prop, $value): bool { |
|
| 2658 | + 'eq' => static function($item, $prop, $value): bool { |
|
| 2659 | 2659 | return $item[$prop] === $value; |
| 2660 | 2660 | }, |
| 2661 | - 'gt' => static function ($item, $prop, $value): bool { |
|
| 2661 | + 'gt' => static function($item, $prop, $value): bool { |
|
| 2662 | 2662 | return $item[$prop] > $value; |
| 2663 | 2663 | }, |
| 2664 | - 'ge' => static function ($item, $prop, $value): bool { |
|
| 2664 | + 'ge' => static function($item, $prop, $value): bool { |
|
| 2665 | 2665 | return $item[$prop] >= $value; |
| 2666 | 2666 | }, |
| 2667 | - 'gte' => static function ($item, $prop, $value): bool { |
|
| 2667 | + 'gte' => static function($item, $prop, $value): bool { |
|
| 2668 | 2668 | return $item[$prop] >= $value; |
| 2669 | 2669 | }, |
| 2670 | - 'lt' => static function ($item, $prop, $value): bool { |
|
| 2670 | + 'lt' => static function($item, $prop, $value): bool { |
|
| 2671 | 2671 | return $item[$prop] < $value; |
| 2672 | 2672 | }, |
| 2673 | - 'le' => static function ($item, $prop, $value): bool { |
|
| 2673 | + 'le' => static function($item, $prop, $value): bool { |
|
| 2674 | 2674 | return $item[$prop] <= $value; |
| 2675 | 2675 | }, |
| 2676 | - 'lte' => static function ($item, $prop, $value): bool { |
|
| 2676 | + 'lte' => static function($item, $prop, $value): bool { |
|
| 2677 | 2677 | return $item[$prop] <= $value; |
| 2678 | 2678 | }, |
| 2679 | - 'ne' => static function ($item, $prop, $value): bool { |
|
| 2679 | + 'ne' => static function($item, $prop, $value): bool { |
|
| 2680 | 2680 | return $item[$prop] !== $value; |
| 2681 | 2681 | }, |
| 2682 | - 'contains' => static function ($item, $prop, $value): bool { |
|
| 2682 | + 'contains' => static function($item, $prop, $value): bool { |
|
| 2683 | 2683 | return \in_array($item[$prop], (array) $value, true); |
| 2684 | 2684 | }, |
| 2685 | - 'notContains' => static function ($item, $prop, $value): bool { |
|
| 2685 | + 'notContains' => static function($item, $prop, $value): bool { |
|
| 2686 | 2686 | return !\in_array($item[$prop], (array) $value, true); |
| 2687 | 2687 | }, |
| 2688 | - 'newer' => static function ($item, $prop, $value): bool { |
|
| 2688 | + 'newer' => static function($item, $prop, $value): bool { |
|
| 2689 | 2689 | return \strtotime($item[$prop]) > \strtotime($value); |
| 2690 | 2690 | }, |
| 2691 | - 'older' => static function ($item, $prop, $value): bool { |
|
| 2691 | + 'older' => static function($item, $prop, $value): bool { |
|
| 2692 | 2692 | return \strtotime($item[$prop]) < \strtotime($value); |
| 2693 | 2693 | }, |
| 2694 | 2694 | ]; |
@@ -2696,7 +2696,7 @@ discard block |
||
| 2696 | 2696 | $result = \array_values( |
| 2697 | 2697 | \array_filter( |
| 2698 | 2698 | $this->toArray(false, true), |
| 2699 | - static function ($item) use ( |
|
| 2699 | + static function($item) use ( |
|
| 2700 | 2700 | $property, |
| 2701 | 2701 | $value, |
| 2702 | 2702 | $ops, |
@@ -2926,7 +2926,7 @@ discard block |
||
| 2926 | 2926 | */ |
| 2927 | 2927 | public function flip(): self |
| 2928 | 2928 | { |
| 2929 | - $generator = function (): \Generator { |
|
| 2929 | + $generator = function(): \Generator { |
|
| 2930 | 2930 | foreach ($this->getGenerator() as $key => $value) { |
| 2931 | 2931 | yield (string) $value => $key; |
| 2932 | 2932 | } |
@@ -3204,9 +3204,9 @@ discard block |
||
| 3204 | 3204 | $jsonObject = \json_decode($json, false); |
| 3205 | 3205 | |
| 3206 | 3206 | $mapper = new \Arrayy\Mapper\Json(); |
| 3207 | - $mapper->undefinedPropertyHandler = static function ($object, $key, $jsonValue) use ($class) { |
|
| 3207 | + $mapper->undefinedPropertyHandler = static function($object, $key, $jsonValue) use ($class) { |
|
| 3208 | 3208 | if ($class->checkPropertiesMismatchInConstructor) { |
| 3209 | - throw new \TypeError('Property mismatch - input: ' . \print_r(['key' => $key, 'jsonValue' => $jsonValue], true) . ' for object: ' . \get_class($object)); |
|
| 3209 | + throw new \TypeError('Property mismatch - input: '.\print_r(['key' => $key, 'jsonValue' => $jsonValue], true).' for object: '.\get_class($object)); |
|
| 3210 | 3210 | } |
| 3211 | 3211 | }; |
| 3212 | 3212 | |
@@ -3274,13 +3274,13 @@ discard block |
||
| 3274 | 3274 | public function getColumn($columnKey = null, $indexKey = null): self |
| 3275 | 3275 | { |
| 3276 | 3276 | if ($columnKey === null && $indexKey === null) { |
| 3277 | - $generator = function () { |
|
| 3277 | + $generator = function() { |
|
| 3278 | 3278 | foreach ($this->getGenerator() as $value) { |
| 3279 | 3279 | yield $value; |
| 3280 | 3280 | } |
| 3281 | 3281 | }; |
| 3282 | 3282 | } else { |
| 3283 | - $generator = function () use ($columnKey, $indexKey) { |
|
| 3283 | + $generator = function() use ($columnKey, $indexKey) { |
|
| 3284 | 3284 | foreach ($this->getGenerator() as $value) { |
| 3285 | 3285 | // reset |
| 3286 | 3286 | $newKey = null; |
@@ -3597,7 +3597,7 @@ discard block |
||
| 3597 | 3597 | |
| 3598 | 3598 | if ($UN_FOUND === null) { |
| 3599 | 3599 | // Generate unique string to use as marker. |
| 3600 | - $UN_FOUND = 'arrayy--' . \uniqid('arrayy', true); |
|
| 3600 | + $UN_FOUND = 'arrayy--'.\uniqid('arrayy', true); |
|
| 3601 | 3601 | } |
| 3602 | 3602 | |
| 3603 | 3603 | if (\is_array($key)) { |
@@ -3649,7 +3649,7 @@ discard block |
||
| 3649 | 3649 | */ |
| 3650 | 3650 | public function implode(string $glue = '', string $prefix = ''): string |
| 3651 | 3651 | { |
| 3652 | - return $prefix . $this->implode_recursive($glue, $this->toArray(), false); |
|
| 3652 | + return $prefix.$this->implode_recursive($glue, $this->toArray(), false); |
|
| 3653 | 3653 | } |
| 3654 | 3654 | |
| 3655 | 3655 | /** |
@@ -3763,7 +3763,7 @@ discard block |
||
| 3763 | 3763 | \array_uintersect( |
| 3764 | 3764 | $this->toArray(), |
| 3765 | 3765 | $search, |
| 3766 | - static function ($a, $b) { |
|
| 3766 | + static function($a, $b) { |
|
| 3767 | 3767 | return $a === $b ? 0 : -1; |
| 3768 | 3768 | } |
| 3769 | 3769 | ), |
@@ -4113,13 +4113,13 @@ discard block |
||
| 4113 | 4113 | // non recursive |
| 4114 | 4114 | |
| 4115 | 4115 | if ($search_values === null) { |
| 4116 | - $arrayFunction = function (): \Generator { |
|
| 4116 | + $arrayFunction = function(): \Generator { |
|
| 4117 | 4117 | foreach ($this->getGenerator() as $key => $value) { |
| 4118 | 4118 | yield $key; |
| 4119 | 4119 | } |
| 4120 | 4120 | }; |
| 4121 | 4121 | } else { |
| 4122 | - $arrayFunction = function () use ($search_values, $strict): \Generator { |
|
| 4122 | + $arrayFunction = function() use ($search_values, $strict): \Generator { |
|
| 4123 | 4123 | $is_array_tmp = \is_array($search_values); |
| 4124 | 4124 | |
| 4125 | 4125 | /** @noinspection PhpParameterByRefIsNotUsedAsReferenceInspection */ |
@@ -4373,7 +4373,7 @@ discard block |
||
| 4373 | 4373 | $useArguments = \func_num_args() > 2; |
| 4374 | 4374 | |
| 4375 | 4375 | return static::create( |
| 4376 | - function () use ($useArguments, $callable, $useKeyAsSecondParameter, $arguments) { |
|
| 4376 | + function() use ($useArguments, $callable, $useKeyAsSecondParameter, $arguments) { |
|
| 4377 | 4377 | foreach ($this->getGenerator() as $key => $value) { |
| 4378 | 4378 | if ($useArguments) { |
| 4379 | 4379 | if ($useKeyAsSecondParameter) { |
@@ -4877,7 +4877,7 @@ discard block |
||
| 4877 | 4877 | */ |
| 4878 | 4878 | public function nth(int $step, int $offset = 0): self |
| 4879 | 4879 | { |
| 4880 | - $arrayFunction = function () use ($step, $offset): \Generator { |
|
| 4880 | + $arrayFunction = function() use ($step, $offset): \Generator { |
|
| 4881 | 4881 | $position = 0; |
| 4882 | 4882 | foreach ($this->getGenerator() as $key => $value) { |
| 4883 | 4883 | if ($position++ % $step !== $offset) { |
@@ -4911,7 +4911,7 @@ discard block |
||
| 4911 | 4911 | { |
| 4912 | 4912 | $keys = \array_flip($keys); |
| 4913 | 4913 | |
| 4914 | - $generator = function () use ($keys): \Generator { |
|
| 4914 | + $generator = function() use ($keys): \Generator { |
|
| 4915 | 4915 | foreach ($this->getGenerator() as $key => $value) { |
| 4916 | 4916 | if (isset($keys[$key])) { |
| 4917 | 4917 | yield $key => $value; |
@@ -5048,7 +5048,7 @@ discard block |
||
| 5048 | 5048 | */ |
| 5049 | 5049 | public function prependImmutable($value, $key = null) |
| 5050 | 5050 | { |
| 5051 | - $generator = function () use ($key, $value): \Generator { |
|
| 5051 | + $generator = function() use ($key, $value): \Generator { |
|
| 5052 | 5052 | if ($this->properties !== []) { |
| 5053 | 5053 | $this->checkType($key, $value); |
| 5054 | 5054 | } |
@@ -5098,7 +5098,7 @@ discard block |
||
| 5098 | 5098 | )->prependToEachKey($suffix) |
| 5099 | 5099 | ->toArray(); |
| 5100 | 5100 | } else { |
| 5101 | - $result[$key . $suffix] = $item; |
|
| 5101 | + $result[$key.$suffix] = $item; |
|
| 5102 | 5102 | } |
| 5103 | 5103 | } |
| 5104 | 5104 | |
@@ -5138,7 +5138,7 @@ discard block |
||
| 5138 | 5138 | } elseif (\is_object($item) === true) { |
| 5139 | 5139 | $result[$key] = $item; |
| 5140 | 5140 | } else { |
| 5141 | - $result[$key] = $item . $suffix; |
|
| 5141 | + $result[$key] = $item.$suffix; |
|
| 5142 | 5142 | } |
| 5143 | 5143 | } |
| 5144 | 5144 | |
@@ -5960,7 +5960,7 @@ discard block |
||
| 5960 | 5960 | */ |
| 5961 | 5961 | public function replaceValues($search, $replacement = ''): self |
| 5962 | 5962 | { |
| 5963 | - $callable = static function ($value) use ($search, $replacement) { |
|
| 5963 | + $callable = static function($value) use ($search, $replacement) { |
|
| 5964 | 5964 | return \str_replace($search, $replacement, $value); |
| 5965 | 5965 | }; |
| 5966 | 5966 | |
@@ -6685,7 +6685,7 @@ discard block |
||
| 6685 | 6685 | * @psalm-suppress MissingClosureParamType |
| 6686 | 6686 | */ |
| 6687 | 6687 | $results = $arrayy->each( |
| 6688 | - static function ($value) use ($sorter) { |
|
| 6688 | + static function($value) use ($sorter) { |
|
| 6689 | 6689 | if (\is_callable($sorter) === true) { |
| 6690 | 6690 | return $sorter($value); |
| 6691 | 6691 | } |
@@ -6758,7 +6758,7 @@ discard block |
||
| 6758 | 6758 | public function split(int $numberOfPieces = 2, bool $keepKeys = false): self |
| 6759 | 6759 | { |
| 6760 | 6760 | if ($keepKeys) { |
| 6761 | - $generator = function () use ($numberOfPieces) { |
|
| 6761 | + $generator = function() use ($numberOfPieces) { |
|
| 6762 | 6762 | $carry = []; |
| 6763 | 6763 | $i = 1; |
| 6764 | 6764 | foreach ($this->getGenerator() as $key => $value) { |
@@ -6781,7 +6781,7 @@ discard block |
||
| 6781 | 6781 | } |
| 6782 | 6782 | }; |
| 6783 | 6783 | } else { |
| 6784 | - $generator = function () use ($numberOfPieces) { |
|
| 6784 | + $generator = function() use ($numberOfPieces) { |
|
| 6785 | 6785 | $carry = []; |
| 6786 | 6786 | $i = 1; |
| 6787 | 6787 | foreach ($this->getGenerator() as $value) { |
@@ -6828,7 +6828,7 @@ discard block |
||
| 6828 | 6828 | public function stripEmpty(): self |
| 6829 | 6829 | { |
| 6830 | 6830 | return $this->filter( |
| 6831 | - static function ($item) { |
|
| 6831 | + static function($item) { |
|
| 6832 | 6832 | if ($item === null) { |
| 6833 | 6833 | return false; |
| 6834 | 6834 | } |
@@ -7037,7 +7037,7 @@ discard block |
||
| 7037 | 7037 | |
| 7038 | 7038 | /* @phpstan-ignore-next-line - reduce will return an array of T */ |
| 7039 | 7039 | $this->array = $this->reduce( |
| 7040 | - static function ($resultArray, $value, $key) { |
|
| 7040 | + static function($resultArray, $value, $key) { |
|
| 7041 | 7041 | if (!\in_array($value, $resultArray, true)) { |
| 7042 | 7042 | $resultArray[] = $value; |
| 7043 | 7043 | } |
@@ -7076,7 +7076,7 @@ discard block |
||
| 7076 | 7076 | */ |
| 7077 | 7077 | $this->array = \array_reduce( |
| 7078 | 7078 | \array_keys($array), |
| 7079 | - static function ($resultArray, $key) use ($array) { |
|
| 7079 | + static function($resultArray, $key) use ($array) { |
|
| 7080 | 7080 | if (!\in_array($array[$key], $resultArray, true)) { |
| 7081 | 7081 | $resultArray[$key] = $array[$key]; |
| 7082 | 7082 | } |
@@ -7173,7 +7173,7 @@ discard block |
||
| 7173 | 7173 | public function values(): self |
| 7174 | 7174 | { |
| 7175 | 7175 | return static::create( |
| 7176 | - function () { |
|
| 7176 | + function() { |
|
| 7177 | 7177 | foreach ($this->getGenerator() as $value) { |
| 7178 | 7178 | yield $value; |
| 7179 | 7179 | } |
@@ -7257,7 +7257,7 @@ discard block |
||
| 7257 | 7257 | public function where(string $keyOrPropertyOrMethod, $value): self |
| 7258 | 7258 | { |
| 7259 | 7259 | return $this->filter( |
| 7260 | - function ($item) use ($keyOrPropertyOrMethod, $value) { |
|
| 7260 | + function($item) use ($keyOrPropertyOrMethod, $value) { |
|
| 7261 | 7261 | $accessorValue = $this->extractValue( |
| 7262 | 7262 | $item, |
| 7263 | 7263 | $keyOrPropertyOrMethod |
@@ -7553,7 +7553,7 @@ discard block |
||
| 7553 | 7553 | protected function getPropertiesFromPhpDoc() |
| 7554 | 7554 | { |
| 7555 | 7555 | static $PROPERTY_CACHE = []; |
| 7556 | - $cacheKey = 'Class::' . static::class; |
|
| 7556 | + $cacheKey = 'Class::'.static::class; |
|
| 7557 | 7557 | |
| 7558 | 7558 | if (isset($PROPERTY_CACHE[$cacheKey])) { |
| 7559 | 7559 | return $PROPERTY_CACHE[$cacheKey]; |
@@ -7866,7 +7866,7 @@ discard block |
||
| 7866 | 7866 | if ($array === null) { |
| 7867 | 7867 | $array = []; |
| 7868 | 7868 | } elseif (!\is_array($array)) { |
| 7869 | - throw new \RuntimeException('Can not set value at this path "' . $key . '" because (' . \gettype($array) . ')"' . \print_r($array, true) . '" is not an array.'); |
|
| 7869 | + throw new \RuntimeException('Can not set value at this path "'.$key.'" because ('.\gettype($array).')"'.\print_r($array, true).'" is not an array.'); |
|
| 7870 | 7870 | } |
| 7871 | 7871 | |
| 7872 | 7872 | $array[$key] = $value; |
@@ -7930,7 +7930,7 @@ discard block |
||
| 7930 | 7930 | && |
| 7931 | 7931 | \count(\array_diff_key($properties, $data)) > 0 |
| 7932 | 7932 | ) { |
| 7933 | - throw new \TypeError('Property mismatch - input: ' . \print_r(\array_keys($data), true) . ' | expected: ' . \print_r(\array_keys($properties), true)); |
|
| 7933 | + throw new \TypeError('Property mismatch - input: '.\print_r(\array_keys($data), true).' | expected: '.\print_r(\array_keys($properties), true)); |
|
| 7934 | 7934 | } |
| 7935 | 7935 | } |
| 7936 | 7936 | |
@@ -8047,7 +8047,7 @@ discard block |
||
| 8047 | 8047 | * |
| 8048 | 8048 | * @return void |
| 8049 | 8049 | */ |
| 8050 | - static function (&$item) { |
|
| 8050 | + static function(&$item) { |
|
| 8051 | 8051 | if ($item instanceof self) { |
| 8052 | 8052 | $item = $item->getArray(); |
| 8053 | 8053 | } |
@@ -8072,7 +8072,7 @@ discard block |
||
| 8072 | 8072 | && |
| 8073 | 8073 | $this->checkPropertiesMismatch === true |
| 8074 | 8074 | ) { |
| 8075 | - throw new \TypeError('The key "' . $key . '" does not exists as "@property" phpdoc. (' . \get_class($this) . ').'); |
|
| 8075 | + throw new \TypeError('The key "'.$key.'" does not exists as "@property" phpdoc. ('.\get_class($this).').'); |
|
| 8076 | 8076 | } |
| 8077 | 8077 | |
| 8078 | 8078 | if (isset($this->properties[self::ARRAYY_HELPER_TYPES_FOR_ALL_PROPERTIES])) { |