| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function build() |
||
| 48 | { |
||
| 49 | // reset the parameterized values |
||
| 50 | $this->values = []; |
||
| 51 | |||
| 52 | // build each select query and concatenate |
||
| 53 | $queries = []; |
||
| 54 | foreach ($this->queries as $row) { |
||
| 55 | list($query, $type) = $row; |
||
| 56 | |||
| 57 | if ($type) { |
||
| 58 | $type .= ' '; |
||
| 59 | } |
||
| 60 | |||
| 61 | $queries[] = 'UNION '.$type.$query->build(); |
||
| 62 | |||
| 63 | $this->values = array_merge( |
||
| 64 | $this->values, |
||
| 65 | $query->getValues() |
||
| 66 | ); |
||
| 67 | } |
||
| 68 | |||
| 69 | return implode(' ', $queries); |
||
| 70 | } |
||
| 71 | } |
||
| 72 |