Skip to content

Commit f423102

Browse files
committed
Fix phpstan
1 parent 28455dd commit f423102

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Collector.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ public function getResults(): array
7070
$count = 0;
7171
$collectedData = [];
7272
$isCallableWhen = is_callable($this->when);
73-
$when = $this->when;
7473

7574
foreach ($this->data as $key => $datum) {
7675
if ($isCallableWhen) {
77-
/** @var callable(mixed $datum, int|string|null $key=): bool $when */
76+
/**
77+
* @var callable(mixed $datum, int|string|null $key=): bool $when
78+
*/
79+
$when = $this->when;
7880
$isFound = ($when)($datum, $key);
7981

8082
Assert::boolean($isFound);

0 commit comments

Comments
 (0)