It seems like getTable() 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
19
/** @scrutinizer ignore-call */
20
$table = $this->getTable();
Loading history...
20
21
if (str_contains($table, ' as ')) {
22
$table = explode(' as ', $table)[1];
23
}
24
25
return $table.'.'.$column;
26
}
27
28
/**
29
* Set an alias for the model's table.
30
*
31
* @param string $alias
32
* @return $this
33
*/
34
public function setAlias($alias)
35
{
36
return $this->setTable($this->getTable().' as '.$alias);
It seems like setTable() 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
36
return $this->/** @scrutinizer ignore-call */ setTable($this->getTable().' as '.$alias);