ElasticsearchDataProviderExtension   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 9
cts 9
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
namespace GBProd\ElasticsearchDataProviderBundle\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
 * Extension class for ElasticsearchDataProviderExtension
12
 *
13
 * @author gbprod <[email protected]>
14
 */
15
class ElasticsearchDataProviderExtension extends Extension
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 2
    public function load(array $configs, ContainerBuilder $container)
21
    {
22 2
        $configuration = new Configuration();
23 2
        $config = $this->processConfiguration($configuration, $configs);
24
25 2
        $loader = new Loader\YamlFileLoader(
26 2
            $container,
27 2
            new FileLocator(__DIR__ . '/../Resources/config')
28 2
        );
29
30 2
        $loader->load('services.yml');
31
    }
32
}