Conditions | 5 |
Paths | 6 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
29 | 8 | public function process(ContainerBuilder $container) |
|
30 | { |
||
31 | // add account providers |
||
32 | 8 | if ($container->has("xabbuh_panda.account_manager")) { |
|
33 | 7 | $accountManager = $container->findDefinition("xabbuh_panda.account_manager"); |
|
34 | 7 | $accountProviderServices = $container->findTaggedServiceIds("xabbuh_panda.account_provider"); |
|
35 | 7 | foreach ($accountProviderServices as $id => $tags) { |
|
36 | 3 | $accountManager->addMethodCall("registerProvider", array(new Reference($id))); |
|
37 | } |
||
38 | } |
||
39 | |||
40 | // add cloud providers |
||
41 | 8 | if ($container->has("xabbuh_panda.cloud_manager")) { |
|
42 | 7 | $cloudManager = $container->findDefinition("xabbuh_panda.cloud_manager"); |
|
43 | 7 | $cloudProviderServices = $container->findTaggedServiceIds("xabbuh_panda.cloud_provider"); |
|
44 | 7 | foreach ($cloudProviderServices as $id => $tags) { |
|
45 | 3 | $cloudManager->addMethodCall("registerProvider", array(new Reference($id))); |
|
46 | } |
||
47 | } |
||
48 | 8 | } |
|
49 | } |
||
50 |