Skip to content

Commit 94f1a87

Browse files
committed
fix phpstan
1 parent 3e18640 commit 94f1a87

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Collector.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,14 @@ public function getResults(): array
7070

7171
$count = 0;
7272
$collectedData = [];
73-
$isCallableWhen = is_callable($this->when);
7473

75-
if ($isCallableWhen) {
74+
if (is_callable($this->when)) {
7675
// filter must be a callable with bool return type
7776
Filter::boolean($this->when);
7877
}
7978

8079
foreach ($this->data as $key => $datum) {
81-
if ($isCallableWhen) {
80+
if ($this->when !== null) {
8281
/**
8382
* @var callable(mixed $datum, int|string|null $key): bool $when
8483
*/

0 commit comments

Comments
 (0)