Completed
Push — master ( 71ae31...9b2b49 )
by David
9s
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 9
Bugs 1 Features 1
Metric Value
wmc 1
c 9
b 1
f 1
lcom 0
cbo 3
dl 0
loc 47
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 44 1
1
<?php
2
3
namespace Knp\Rad\AutoRegistration\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
    public function getConfigTreeBuilder()
11
    {
12
        $builder = new TreeBuilder();
13
        $builder
14
            ->root('knp_rad_auto_registration')
15
            ->children()
16
                ->arrayNode('enable')
17
                    ->addDefaultsIfNotSet()
18
                    ->children()
19
                        ->booleanNode('doctrine')
20
                            ->defaultFalse()
21
                            ->treatNullLike(true)
22
                        ->end()
23
                        ->booleanNode('doctrine_mongodb')
24
                            ->defaultFalse()
25
                            ->treatNullLike(true)
26
                        ->end()
27
                        ->booleanNode('doctrine_couchdb')
28
                            ->defaultFalse()
29
                            ->treatNullLike(true)
30
                        ->end()
31
                        ->booleanNode('form_type_extension')
32
                            ->defaultFalse()
33
                            ->treatNullLike(true)
34
                        ->end()
35
                        ->booleanNode('security_voter')
36
                            ->defaultFalse()
37
                            ->treatNullLike(true)
38
                        ->end()
39
                        ->booleanNode('twig_extension')
40
                            ->defaultFalse()
41
                            ->treatNullLike(true)
42
                        ->end()
43
                    ->end()
44
                ->end()
45
                ->arrayNode('bundles')
46
                    ->prototype('scalar')->end()
47
                    ->defaultValue([])
48
                ->end()
49
            ->end()
50
        ;
51
52
        return $builder;
53
    }
54
}
55