Completed
Push — master ( a36c27...010ee5 )
by GBProd
02:47
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 31
ccs 19
cts 19
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 25 1
1
<?php
2
3
namespace GBProd\ElasticsearchExtraBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Configuration
10
 * 
11
 * @author gbprod <[email protected]>
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function getConfigTreeBuilder()
19
    {
20 1
        $treeBuilder = new TreeBuilder();
21 1
        $rootNode = $treeBuilder->root('elasticsearch_extra_bundle');
22
23
        $rootNode
24 1
            ->children()
25 1
                ->arrayNode('clients')
26 1
                    ->useAttributeAsKey('id')
27 1
                    ->prototype('array')
28 1
                        ->children()
29 1
                            ->arrayNode('indices')
30 1
                                ->defaultValue([])
31 1
                                ->prototype('array')
32 1
                                    ->prototype('variable')->end()
33 1
                                ->end()
34 1
                            ->end()
35 1
                        ->end()
36 1
                    ->end()
37 1
                ->end()
38 1
            ->end()
39
        ;
40 1
41 1
        return $treeBuilder;
42
    }
43
}
44