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 3e18640 commit 94f1a87Copy full SHA for 94f1a87
src/Collector.php
@@ -70,15 +70,14 @@ public function getResults(): array
70
71
$count = 0;
72
$collectedData = [];
73
- $isCallableWhen = is_callable($this->when);
74
75
- if ($isCallableWhen) {
+ if (is_callable($this->when)) {
76
// filter must be a callable with bool return type
77
Filter::boolean($this->when);
78
}
79
80
foreach ($this->data as $key => $datum) {
81
+ if ($this->when !== null) {
82
/**
83
* @var callable(mixed $datum, int|string|null $key): bool $when
84
*/
0 commit comments