Completed
Push — develop ( d322ef...d5777f )
by Baptiste
07:26
created

InnmindCommandBusExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 17 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\CommandBusBundle\DependencyInjection;
5
6
use Symfony\Component\{
7
    HttpKernel\DependencyInjection\Extension,
8
    DependencyInjection\ContainerBuilder,
9
    DependencyInjection\Loader,
10
    Config\FileLocator
11
};
12
13
final class InnmindCommandBusExtension extends Extension
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function load(array $configs, ContainerBuilder $container)
19
    {
20
        $loader = new Loader\YamlFileLoader(
21
            $container,
22
            new FileLocator(__DIR__.'/../Resources/config')
23
        );
24
        $loader->load('services.yml');
25
        $config = $this->processConfiguration(
26
            new Configuration,
27
            $configs
28
        );
29
30
        $container->setParameter(
31
            'innmind_command_bus.stack',
32
            $config['stack']
33
        );
34
    }
35
}
36