Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 27
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 21 1
1
<?php
2
3
namespace GBProd\ElasticaExtraBundle\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 13
    public function getConfigTreeBuilder()
19
    {
20 13
        $treeBuilder = new TreeBuilder();
21 13
        $rootNode = $treeBuilder->root('elastica_extra_bundle');
22
23
        $rootNode
24 13
            ->children()
25 13
                ->scalarNode('default_client')
26 13
                    ->defaultValue(null)
27 13
                ->end()
28 13
                ->arrayNode('indices')
29 13
                    ->defaultValue([])
30 13
                    ->prototype('array')
31 13
                        ->prototype('variable')->end()
32 13
                    ->end()
33 13
                ->end()
34 13
            ->end()
35
        ;
36
37 13
        return $treeBuilder;
38
    }
39
}
40
41