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