CrowdReactiveLobExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 5
dl 0
loc 14
ccs 8
cts 8
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 11 1
1
<?php
2
3
namespace CrowdReactive\LobBundle\DependencyInjection;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
8
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9
10
class CrowdReactiveLobExtension extends Extension
11
{
12 3
    public function load(array $configs, ContainerBuilder $container)
13
    {
14 3
        $configuration = new Configuration();
15 3
        $lobConfig = $this->processConfiguration($configuration, $configs);
16
17 2
        $container->setParameter('crowd_reactive_lob.api_key', $lobConfig['api_key']);
18 2
        $container->setParameter('crowd_reactive_lob.version', $lobConfig['version']);
19
20 2
        $yamlLoader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
21 2
        $yamlLoader->load('services.yml');
22 2
    }
23
}
24