Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 6 | public function load(array $configs, ContainerBuilder $container) |
|
23 | { |
||
24 | 6 | $configuration = new Configuration(); |
|
25 | 6 | $config = $this->processConfiguration($configuration, $configs); |
|
26 | |||
27 | 6 | $container->setParameter('prometheus_metrics_bundle.namespace', $config['namespace']); |
|
28 | 6 | $container->setParameter('prometheus_metrics_bundle.type', $config['type']); |
|
29 | 6 | if ('redis' === $config['type']) { |
|
30 | 3 | $container->setParameter('prometheus_metrics_bundle.redis', $config['redis']); |
|
31 | } |
||
32 | 6 | $container->setParameter('prometheus_metrics_bundle.ignored_routes', $config['ignored_routes']); |
|
33 | |||
34 | 6 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
35 | 6 | $loader->load('services.xml'); |
|
36 | 6 | } |
|
38 |