Configuration   A
last analyzed

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 21
cts 21
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 27 1
1
<?php
2
3
namespace Dontdrinkandroot\RestBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * @author Philip Washington Sorst <[email protected]>
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 12
    public function getConfigTreeBuilder()
17
    {
18 12
        $treeBuilder = new TreeBuilder();
19 12
        $rootNode = $treeBuilder->root('ddr_rest');
20
21
        // @formatter:off
22 12
        $rootNode->children()
23 12
            ->arrayNode('paths')
24 12
                ->prototype('scalar')->end()
25 12
            ->end()
26 12
            ->arrayNode('metadata')
27 12
                ->children()
28 12
                    ->arrayNode('directories')
29 12
                        ->prototype('array')
30 12
                            ->children()
31 12
                                ->scalarNode('path')->isRequired()->end()
32 12
                                ->scalarNode('namespace_prefix')->defaultValue('')->end()
33 12
                            ->end()
34 12
                        ->end()
35 12
                    ->end()
36 12
                ->end()
37 12
            ->end()
38 12
        ->end();
39
        // @formatter:on
40
41 12
        return $treeBuilder;
42
    }
43
}
44