Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 24 1
1
<?php
2
3
namespace Pgs\RestfonyBundle\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
        $treeBuilder = new TreeBuilder();
13
        $rootNode = $treeBuilder->root('pgs_restfony');
14
15
        $rootNode
16
            ->children()
17
                ->arrayNode('modules')
18
                ->prototype('array')
19
                    ->children()
20
                        ->scalarNode('controller')->isRequired()->end()
21
                        ->scalarNode('manager')->isRequired()->end()
22
                        ->scalarNode('entity')->isRequired()->end()
23
                        ->scalarNode('form')->end()
24
                        ->scalarNode('filter')->end()
25
                        ->arrayNode('sorts')
26
                            ->prototype('scalar')
27
                        ->end()
28
                    ->end()
29
            ->end()
30
        ;
31
32
        return $treeBuilder;
33
    }
34
}
35