| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class SubQueryList extends AbstractList |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * {@inheritdoc} |
||
| 9 | */ |
||
| 10 | protected $separator = ','; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Magic method __invoke, used when the user call object like a function |
||
| 14 | * @link http://php.net/manual/en/language.oop5.magic.php#object.invoke |
||
| 15 | * |
||
| 16 | * @param string $shortcut The shortcut to use into the request |
||
| 17 | * @param string|\BfwSql\Queries\AbstractQuery $subQuery The sub-query |
||
| 18 | * |
||
| 19 | * @return void |
||
| 20 | */ |
||
| 21 | public function __invoke(string $shortcut, $subQuery) |
||
| 22 | { |
||
| 23 | $this->list[] = new SubQuery($shortcut, $subQuery); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | public function generate(): string |
||
| 42 | } |
||
| 43 | } |
||
| 44 |