Completed
Pull Request — master (#34)
by
unknown
02:55
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 48 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('constraint_validator')
20
                            ->defaultFalse()
21
                            ->treatNullLike(true)
22
                        ->end()
23
                        ->booleanNode('doctrine')
24
                            ->defaultFalse()
25
                            ->treatNullLike(true)
26
                        ->end()
27
                        ->booleanNode('doctrine_mongodb')
28
                            ->defaultFalse()
29
                            ->treatNullLike(true)
30
                        ->end()
31
                        ->booleanNode('doctrine_couchdb')
32
                            ->defaultFalse()
33
                            ->treatNullLike(true)
34
                        ->end()
35
                        ->booleanNode('form_type_extension')
36
                            ->defaultFalse()
37
                            ->treatNullLike(true)
38
                        ->end()
39
                        ->booleanNode('security_voter')
40
                            ->defaultFalse()
41
                            ->treatNullLike(true)
42
                        ->end()
43
                        ->booleanNode('twig_extension')
44
                            ->defaultFalse()
45
                            ->treatNullLike(true)
46
                        ->end()
47
                    ->end()
48
                ->end()
49
                ->arrayNode('bundles')
50
                    ->prototype('scalar')->end()
51
                    ->defaultValue([])
52
                ->end()
53
            ->end()
54
        ;
55
56
        return $builder;
57
    }
58
}
59