Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
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 31
rs 10
c 0
b 0
f 0
ccs 21
cts 21
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 25 1
1
<?php
2
3
/*
4
 * This file is part of the Lug package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Lug\Bundle\StorageBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * @author GeLo <[email protected]>
19
 */
20
class Configuration implements ConfigurationInterface
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25 6
    public function getConfigTreeBuilder()
26
    {
27 6
        $treeBuilder = new TreeBuilder();
28
        $treeBuilder
29 6
            ->root('lug_storage')
30 6
            ->children()
31 6
                ->arrayNode('cookie')
32 6
                    ->canBeEnabled()
33 6
                ->end()
34 6
                ->arrayNode('doctrine')
35 6
                    ->canBeEnabled()
36 6
                    ->children()
37 6
                        ->scalarNode('service')
38 6
                            ->isRequired()
39 6
                            ->cannotBeEmpty()
40 6
                        ->end()
41 6
                    ->end()
42 6
                ->end()
43 6
                ->arrayNode('session')
44 6
                    ->canBeEnabled()
45 6
                ->end()
46 6
            ->end();
47
48 6
        return $treeBuilder;
49
    }
50
}
51