$items of type array is incompatible with the type Illuminate\Contracts\Support\Arrayable expected by parameter $value of collect().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
12
return collect(/** @scrutinizer ignore-type */ $items)->map(function ($attributes) use ($class) {
Loading history...
13
return $this->transformItem($attributes, $class);
14
});
15
}
16
17
protected function transformItem(array $attributes, string $class): ApiResource