Completed
Push — standalone ( fe4753...a7b79f )
by Philip
03:48
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 29 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
class Configuration implements ConfigurationInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 4
    public function getConfigTreeBuilder()
14
    {
15 4
        $treeBuilder = new TreeBuilder();
16 4
        $rootNode = $treeBuilder->root('ddr_rest');
17
18
        // @formatter:off
19 4
        $rootNode->children()
20 4
            ->scalarNode('access_token_class')->defaultNull()->end()
21 4
            ->scalarNode('authentication_provider_key')->defaultNull()->end()
22 4
            ->arrayNode('paths')
23 4
                ->prototype('scalar')->end()
24 4
            ->end()
25 4
            ->arrayNode('metadata')
26 4
                ->children()
27 4
                    ->arrayNode('directories')
28 4
                        ->prototype('array')
29 4
                            ->children()
30 4
                                ->scalarNode('path')->isRequired()->end()
31 4
                                ->scalarNode('namespace_prefix')->defaultValue('')->end()
32 4
                            ->end()
33 4
                        ->end()
34 4
                    ->end()
35 4
                ->end()
36 4
            ->end()
37 4
        ->end();
38
        // @formatter:on
39
40 4
        return $treeBuilder;
41
    }
42
}
43