Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | 114 | public function qualifyColumn($column) |
|
14 | { |
||
15 | 114 | if (str_contains($column, '.')) { |
|
16 | 2 | return $column; |
|
17 | } |
||
18 | |||
19 | 114 | $table = $this->getTable(); |
|
|
|||
20 | |||
21 | 114 | if (str_contains($table, ' as ')) { |
|
22 | 17 | $table = explode(' as ', $table)[1]; |
|
23 | } |
||
24 | |||
25 | 114 | return $table.'.'.$column; |
|
26 | } |
||
39 |