Completed
Push — master ( 205548...aaddfb )
by Tobias
05:26
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 27 1
1
<?php
2
3
namespace Happyr\ApiBundle\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
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 1
    public function getConfigTreeBuilder()
17
    {
18 1
        $treeBuilder = new TreeBuilder();
19 1
        $rootNode = $treeBuilder->root('happyr_api');
20
21
        $rootNode
22 1
            ->children()
23 1
                ->arrayNode('wsse')
24 1
                    ->canBeEnabled()
25 1
                    ->children()
26 1
                        ->booleanNode('debug')->defaultFalse()->end()
27 1
                        ->arrayNode('debug_roles')->prototype('scalar')->end()->end()
28 1
                        ->scalarNode('user_provider')->isRequired()->cannotBeEmpty()->end()
29 1
                        ->scalarNode('cache_service')->isRequired()->cannotBeEmpty()->end()
30 1
                        ->scalarNode('lifetime')->cannotBeEmpty()->defaultValue('300')->end()
31 1
                    ->end()
32 1
                ->end()
33 1
                ->arrayNode('exception_listener')
34 1
                    ->canBeDisabled()
35 1
                    ->children()
36 1
                        ->scalarNode('path_prefix')->defaultValue('/')->end()
37 1
                    ->end()
38 1
                ->end()
39 1
            ->end();
40
41 1
        return $treeBuilder;
42
    }
43
}
44