FlagbitCurrencyExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 6
dl 0
loc 22
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 11 1
1
<?php
2
3
namespace Flagbit\Bundle\CurrencyBundle\DependencyInjection;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Loader;
8
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9
10
class FlagbitCurrencyExtension extends Extension
11
{
12
    /**
13
     * @param array            $config
14
     * @param ContainerBuilder $container
15
     *
16
     * @throws \Exception
17
     *
18
     * @api
19
     */
20 1
    public function load(array $config, ContainerBuilder $container)
21
    {
22 1
        $configuration = new Configuration();
23 1
        $config = $this->processConfiguration($configuration, $config);
24
25 1
        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
26 1
        $loader->load('services.xml');
27
28 1
        $container->findDefinition('flagbit_currency')
29 1
            ->setArgument(1, $config['default_currency']);
30 1
    }
31
}
32