InnmindEventBusExtension::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 10
cts 10
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 11
nc 1
nop 2
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\EventBusBundle\DependencyInjection;
5
6
use Symfony\Component\{
7
    HttpKernel\DependencyInjection\Extension,
8
    DependencyInjection\ContainerBuilder,
9
    DependencyInjection\Loader,
10
    Config\FileLocator
11
};
12
13
final class InnmindEventBusExtension extends Extension
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18 4
    public function load(array $configs, ContainerBuilder $container)
19
    {
20 4
        $loader = new Loader\YamlFileLoader(
21
            $container,
22 4
            new FileLocator(__DIR__.'/../Resources/config')
23
        );
24 4
        $loader->load('services.yml');
25 4
        $config = $this->processConfiguration(
26 4
            new Configuration,
27
            $configs
28
        );
29
30 3
        $container->setParameter(
31 3
            'innmind_event_bus.stack',
32 3
            $config['stack']
33
        );
34 3
    }
35
}
36