It seems like addMediaToCollection() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
It seems like addMedia() must be provided by classes using this trait. How about adding it as abstract method to this trait?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
51
/** @scrutinizer ignore-call */
52
$fileAdder = $this->addMedia($tmpFile);
Loading history...
52
1
$fileAdder->setFileName($name);
53
1
$fileAdder->toMediaCollection('files');
54
1
55
unlink($tmpFile);
56
return $fileAdder;
57
}
58
59
/**
60
* @param string $collectionName
61
* @param array $filters
62
*
63
* @return Collection
64
*/
65
abstract public function getMedia(string $collectionName = 'default', $filters = []): Collection;