We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d7ad8d commit 28455ddCopy full SHA for 28455dd
src/Collector.php
@@ -70,10 +70,12 @@ public function getResults(): array
70
$count = 0;
71
$collectedData = [];
72
$isCallableWhen = is_callable($this->when);
73
+ $when = $this->when;
74
75
foreach ($this->data as $key => $datum) {
76
if ($isCallableWhen) {
- $isFound = ($this->when)($datum, $key);
77
+ /** @var callable(mixed $datum, int|string|null $key=): bool $when */
78
+ $isFound = ($when)($datum, $key);
79
80
Assert::boolean($isFound);
81
0 commit comments