Conditions | 5 |
Paths | 16 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
18 | public function assemble() |
||
19 | { |
||
20 | $query = ($this->_query1 instanceof Union) ? "(" . $this->_query1 . ")" : $this->_query1; |
||
21 | $query .= " UNION "; |
||
22 | $query .= ($this->_query2 instanceof Union) ? "(" . $this->_query2 . ")" : $this->_query2; |
||
23 | |||
24 | $order = $this->parseOrder(); |
||
25 | |||
26 | if (!empty($order)) { |
||
27 | $query .= " ORDER BY $order"; |
||
28 | } |
||
29 | |||
30 | if (!empty($this->parts['limit'])) { |
||
31 | $query .= " LIMIT {$this->parts['limit']}"; |
||
32 | } |
||
33 | |||
34 | return $query; |
||
35 | } |
||
36 | } |
||
37 |