| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 45.45% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | final class UnionKeyword implements Component |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Parses the tokens contained in the given list in the context of the given parser. |
||
| 22 | * |
||
| 23 | * @param Parser $parser the parser that serves as context |
||
| 24 | * @param TokensList $list the list of tokens that are being parsed |
||
| 25 | * @param array<string, mixed> $options parameters for parsing |
||
| 26 | * |
||
| 27 | * @return mixed |
||
| 28 | * |
||
| 29 | * @throws RuntimeException not implemented yet. |
||
| 30 | */ |
||
| 31 | public static function parse(Parser $parser, TokensList $list, array $options = []) |
||
| 34 | } |
||
| 35 | |||
| 36 | public static function build($component): string |
||
|
|
|||
| 37 | { |
||
| 38 | throw new RuntimeException(Translator::gettext('Not implemented yet.')); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param UnionKeyword[][] $component the component to be built |
||
| 43 | */ |
||
| 44 | 8 | public static function buildAll(array $component): string |
|
| 45 | { |
||
| 46 | 8 | $tmp = []; |
|
| 47 | 8 | foreach ($component as $componentPart) { |
|
| 48 | 8 | $tmp[] = $componentPart[0] . ' ' . $componentPart[1]; |
|
| 49 | } |
||
| 50 | |||
| 51 | 8 | return implode(' ', $tmp); |
|
| 52 | } |
||
| 53 | |||
| 54 | public function __toString(): string |
||
| 57 | } |
||
| 58 | } |
||
| 59 |