Total Complexity | 5 |
Total Lines | 42 |
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 | /** |
||
37 | * @param UnionKeyword $component |
||
38 | */ |
||
39 | public static function build($component): string |
||
40 | { |
||
41 | throw new RuntimeException(Translator::gettext('Not implemented yet.')); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param UnionKeyword[][] $component the component to be built |
||
46 | */ |
||
47 | 8 | public static function buildAll(array $component): string |
|
48 | { |
||
49 | 8 | $tmp = []; |
|
50 | 8 | foreach ($component as $componentPart) { |
|
51 | 8 | $tmp[] = $componentPart[0] . ' ' . $componentPart[1]; |
|
52 | } |
||
53 | |||
54 | 8 | return implode(' ', $tmp); |
|
55 | } |
||
56 | |||
57 | public function __toString(): string |
||
60 | } |
||
61 | } |
||
62 |