diff --git a/src/Operation/Split.php b/src/Operation/Split.php index 1adf8d855..612b3de9d 100644 --- a/src/Operation/Split.php +++ b/src/Operation/Split.php @@ -68,7 +68,7 @@ static function (Iterator $iterator) use ($type, $callbacks): Generator { * @psalm-param bool $carry * @psalm-param callable(T, TKey, Iterator): bool $callable */ - static fn (bool $carry, callable $callable): bool => ($callable($current, $key, $iterator)) || $carry; + static fn (bool $carry, callable $callable): bool => $carry || ($callable($current, $key, $iterator)); foreach ($iterator as $key => $value) { $callbackReturn = array_reduce(