Conditions | 6 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
18 | 9 | protected function compileUnion(array $union) |
|
19 | { |
||
20 | 9 | $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 8); |
|
21 | |||
22 | 9 | if (($backtrace[6]['class'] === Builder::class && $backtrace[6]['function'] === 'withExpression') |
|
23 | 9 | || ($backtrace[7]['class'] === Builder::class && $backtrace[7]['function'] === 'withExpression')) { |
|
24 | 5 | $conjunction = $union['all'] ? ' union all ' : ' union '; |
|
25 | |||
26 | 5 | return $conjunction.$union['query']->toSql(); |
|
27 | } |
||
28 | |||
29 | 4 | return parent::compileUnion($union); |
|
30 | } |
||
32 |