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\Collector\QueueCollector. 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
17
$collector->/** @scrutinizer ignore-call */
18
collect(
Loading history...
18
operation: 'read',
19
path: __FILE__,
20
args: ['arg1' => 'v1', 'arg2' => 'v2'],
21
);
22
$collector->collect(
23
operation: 'read',
24
path: __FILE__,
25
args: ['arg3' => 'v3', 'arg4' => 'v4'],
26
);
27
}
28
29
protected function getCollector(): CollectorInterface
30
{
31
return new HttpStreamCollector();
32
}
33
34
protected function checkCollectedData(array $data): void