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