The method collect() does not exist on Yiisoft\Yii\Debug\Collector\CollectorInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Yiisoft\Yii\Debug\Collec...mmaryCollectorInterface. Are you sure you never get one of those?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
21
$collector->/** @scrutinizer ignore-call */
22
collect(1, (new Result())->addError('Too low', ['arg1' => 'v1']), [new Number(min: 7)]);
Loading history...
22
$collector->collect(10, new Result(), [new Number(min: 7)]);
23
}
24
25
protected function getCollector(): CollectorInterface
26
{
27
return new ValidatorCollector();
28
}
29
30
protected function checkCollectedData(array $data): void
31
{
32
parent::checkCollectedData($data);
33
34
$this->assertEquals(
35
[
36
[
37
'value' => 1,
38
'rules' => [
39
new Number(min: 7),
40
],
41
'result' => false,
42
'errors' => [
43
new Error('Too low', ['arg1' => 'v1']),
44
],
45
],
46
[
47
'value' => 10,
48
'rules' => [
49
new Number(min: 7),
50
],
51
'result' => true,
52
'errors' => [],
53
],
54
],
55
$data
56
);
57
}
58
59
protected function checkIndexData(array $data): void