| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 2 | public function compile(QueryBuilder $queryBuilder): string |
|
| 35 | { |
||
| 36 | 2 | $collections = []; |
|
| 37 | 2 | foreach ($this->collections as $key => $collection) { |
|
| 38 | 2 | $collections[$key] = $queryBuilder->normalizeArgument($collection, 'Collection'); |
|
| 39 | 2 | $queryBuilder->registerCollections($collection, 'read'); |
|
| 40 | } |
||
| 41 | |||
| 42 | 2 | $output = "WITH "; |
|
| 43 | 2 | $implosion = ''; |
|
| 44 | 2 | foreach ($collections as $collection) { |
|
| 45 | 2 | $implosion .= ', ' . $collection->compile($queryBuilder); |
|
| 46 | } |
||
| 47 | 2 | $output .= ltrim($implosion, ', '); |
|
| 48 | |||
| 49 | 2 | return $output; |
|
| 50 | } |
||
| 52 |