Conditions | 4 |
Paths | 5 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
15 | 3 | public function process(ContainerBuilder $container) |
|
16 | { |
||
17 | 3 | if (!$container->has('psysh.shell')) { |
|
18 | 1 | return; |
|
19 | } |
||
20 | |||
21 | 2 | $matchers = []; |
|
22 | |||
23 | 2 | foreach ($container->findTaggedServiceIds('psysh.matcher', true) as $id => $tags) { |
|
24 | 1 | $matchers[] = new Reference($id); |
|
25 | } |
||
26 | |||
27 | 2 | if (empty($matchers)) { |
|
28 | 1 | return; |
|
29 | } |
||
30 | |||
31 | 1 | $container->getDefinition('psysh.config') |
|
32 | 1 | ->addMethodCall('addMatchers', [$matchers]); |
|
33 | 1 | } |
|
34 | } |
||
35 |