Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 10
nc 1
nop 0
crap 1
1
<?php
2
3
namespace GBProd\ElasticaProviderBundle\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 6
    public function getConfigTreeBuilder()
19
    {
20 6
        $treeBuilder = new TreeBuilder();
21 6
        $rootNode = $treeBuilder->root('elastica_provider');
22
        
23
        $rootNode
24 6
            ->children()
25 6
                ->scalarNode('default_client')
26 6
                    ->defaultValue(null)
27 6
                ->end()
28 6
            ->end()
29
        ;
30
        
31 6
        return $treeBuilder;
32
    }
33
}