HappyrBlazeExtension::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Happyr\BlazeBundle\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
/**
11
 * @author Tobias Nyholm <[email protected]>
12
 */
13
class HappyrBlazeExtension extends Extension
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18 1
    public function load(array $configs, ContainerBuilder $container)
19
    {
20 1
        $configuration = new Configuration();
21 1
        $config = $this->processConfiguration($configuration, $configs);
22
23 1
        $container->setParameter('happyr.blaze.objects', $config['objects']);
24
25 1
        $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
26 1
        $loader->load('services.xml');
27 1
    }
28
}
29