Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 8 | public function compile(QueryBuilder $queryBuilder): string |
|
31 | { |
||
32 | 8 | $this->expression = $queryBuilder->normalizeArgument( |
|
33 | 8 | $this->expression, |
|
34 | 8 | ['Boolean', 'Object', 'List', 'Function', 'Variable', 'Reference', 'Query', 'Bind'] |
|
35 | ); |
||
36 | |||
37 | 8 | $output = 'RETURN'; |
|
38 | 8 | if ($this->distinct) { |
|
39 | 1 | $output .= ' DISTINCT'; |
|
40 | } |
||
41 | |||
42 | 8 | return $output . ' ' . $this->expression->compile($queryBuilder); |
|
43 | } |
||
45 |