Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 17
c 1
b 0
f 0
dl 0
loc 24
ccs 16
cts 16
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 19 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 7
    public function getConfigTreeBuilder(): TreeBuilder
14
    {
15 7
        $builder = new TreeBuilder('sb_redis');
16
        $builder
17 7
            ->getRootNode()
18 7
            ->children()
19 7
                ->arrayNode('clients')
20 7
                    ->addDefaultChildrenIfNoneSet('default')
21 7
                    ->useAttributeAsKey('default')
22 7
                    ->prototype('array')
23 7
                        ->children()
24 7
                            ->arrayNode('$parameters')->prototype('variable')->end()->end()
25 7
                            ->arrayNode('$options')->prototype('variable')->end()->end()
26 7
                        ->end()
27 7
                    ->end()
28 7
                ->end()
29 7
            ->end();
30
31 7
        return $builder;
32
    }
33
}
34