Test Setup Failed
Pull Request — master (#7)
by Dmitry
05:07
created

Configuration::addClientsSection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 19
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 21
ccs 19
cts 19
cp 1
rs 9.3142
c 0
b 0
f 0
cc 1
eloc 19
nc 1
nop 1
crap 1
1
<?php
2
3
namespace SymfonyBundles\RedisBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function getConfigTreeBuilder()
14
    {
15 5
        $builder = new TreeBuilder();
16
        $builder
17 5
            ->root('sb_redis')
18 5
            ->children()
19
                ->arrayNode('clients')
20 5
                    ->addDefaultChildrenIfNoneSet('default')
21 5
                    ->useAttributeAsKey('default')
22
                    ->prototype('array')
23 5
                        ->children()
24
                            ->arrayNode('$parameters')->prototype('variable')->end()->end()
25
                            ->arrayNode('$options')->prototype('variable')->end()->end()
26
                        ->end()
27
                    ->end()
28
                ->end()
29
            ->end();
30
31 5
        return $builder;
32
    }
33
}
34