Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function create(ContainerInterface $container, string $id, array $argument): ArgumentParserInterface |
||
36 | { |
||
37 | // exit |
||
38 | switch ($argument['type']) { |
||
39 | case 'service': |
||
40 | return new Service($container, $id, $argument); |
||
41 | case 'value': |
||
42 | return new Value($argument); |
||
43 | default: |
||
44 | throw new Exception(sprintf('Unknown argument type "%s"', $argument['type'])); |
||
45 | } |
||
48 |