It seems like getAttribute() 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
9
/** @scrutinizer ignore-call */
10
$value = $this->getAttribute($key);
Loading history...
10
11
4
if ($value && !is_numeric($value)) {
12
2
throw new \InvalidArgumentException("Value of key [{$key}] is not numeric");
It seems like setAttribute() 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