Conditions | 2 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 6 | ||
Bugs | 0 | Features | 4 |
1 | <?php |
||
24 | 21 | public function compile(QueryBuilder $qb) |
|
25 | { |
||
26 | 21 | $clauses = $qb->getQueryClauses(); |
|
27 | |||
28 | 21 | return implode(' ', array_filter([ |
|
29 | 21 | $clauses->getSelectExpression()->compile(), |
|
30 | 21 | $qb->getRootTables()->isEmpty() ? '' : 'FROM ' . $qb->getRootTables()->compile(), |
|
31 | 21 | $qb->getJoinTables()->compile(), |
|
32 | 21 | $clauses->getWhereExpression()->compile(), |
|
33 | 21 | $clauses->getGroupByExpression()->compile(), |
|
34 | 21 | $clauses->getHavingExpression()->compile(), |
|
35 | 21 | $clauses->getOrderByExpression()->compile() |
|
36 | 21 | ])); |
|
37 | } |
||
38 | } |