Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 2 | public function process(ContainerBuilder $container) |
|
18 | { |
||
19 | 2 | if (false === $container->has('psysh.shell')) { |
|
20 | 1 | return; |
|
21 | } |
||
22 | |||
23 | 2 | $services = $container->findTaggedServiceIds('psysh.matcher', true); |
|
24 | 2 | if (empty($services)) { |
|
25 | 1 | return; |
|
26 | } |
||
27 | |||
28 | 1 | $matchers = \array_map( |
|
29 | static function ($id) { return new Reference($id); }, |
||
30 | 1 | \array_keys($services) |
|
31 | ); |
||
32 | |||
33 | 1 | $container->getDefinition('psysh.config') |
|
34 | 1 | ->addMethodCall('addTabCompletionMatchers', [$matchers]); |
|
35 | 1 | } |
|
36 | } |
||
37 |