InnmindCommandBusExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 23
ccs 10
cts 10
cp 1
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 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_command_bus.stack',
32 3
            $config['stack']
33
        );
34 3
    }
35
}
36