Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 48
ccs 38
cts 38
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 42 1
1
<?php
2
3
namespace Majora\Bundle\FrameworkExtraBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the class that validates and merges configuration from your app/config files.
10
 *
11
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18 2
    public function getConfigTreeBuilder()
19
    {
20 2
        $treeBuilder = new TreeBuilder();
21 2
        $treeBuilder->root('majora_framework_extra')
22 2
            ->addDefaultsIfNotSet()
23 2
            ->children()
24 2
                ->arrayNode('clock')
25 2
                    ->canBeEnabled()
26 2
                    ->children()
27 2
                        ->scalarNode('mock_param')
28 2
                            ->defaultValue('_date_mock')
29 2
                            ->cannotBeEmpty()
30 2
                        ->end()
31 2
                    ->end()
32 2
                ->end()
33 2
                ->arrayNode('translations')
34 2
                    ->canBeEnabled()
35 2
                    ->children()
36 2
                        ->arrayNode('locales')
37 2
                            ->isRequired()
38 2
                            ->cannotBeEmpty()
39 2
                            ->prototype('scalar')->end()
40 2
                        ->end()
41 2
                    ->end()
42 2
                ->end()
43 2
                ->arrayNode('agnostic_url_generator')
44 2
                    ->canBeEnabled()
45 2
                ->end()
46 2
                ->arrayNode('exception_listener')
47 2
                    ->canBeEnabled()
48 2
                ->end()
49 2
                ->arrayNode('doctrine_events_proxy')
50 2
                    ->canBeEnabled()
51 2
                ->end()
52 2
                ->arrayNode('json_form_extension')
53 2
                    ->canBeEnabled()
54 2
                ->end()
55 2
            ->end()
56
        ;
57
58 2
        return $treeBuilder;
59
    }
60
}
61