AlgoliaSpecificationExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

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

1 Method

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