Completed
Push — master ( fc9a62...628a17 )
by GBProd
02:30
created

Configuration::getConfigTreeBuilder()   A

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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 15
ccs 9
cts 9
cp 1
rs 9.4285
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 5
    public function getConfigTreeBuilder()
19
    {
20 5
        $treeBuilder = new TreeBuilder();
21 5
        $rootNode = $treeBuilder->root('elastica_provider');
22
        
23
        $rootNode
24 5
            ->children()
25 5
                ->scalarNode('default_client')
26 5
                    ->defaultValue(null)
27 5
                ->end()
28 5
            ->end()
29
        ;
30
        
31 5
        return $treeBuilder;
32
    }
33
}