Completed
Push — develop ( a73fad...2d5c57 )
by Baptiste
10:58
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 15 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Rest\ServerBundle\DependencyInjection;
5
6
use Symfony\Component\Config\Definition\{
7
    Builder\TreeBuilder,
8
    Builder\NodeBuilder,
9
    ConfigurationInterface
10
};
11
12
final class Configuration implements ConfigurationInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder;
20
        $root = $treeBuilder->root('innmind_rest_server');
21
22
        $root
23
            ->children()
24
                ->arrayNode('types')
25
                    ->defaultValue([])
26
                    ->prototype('scalar')->end()
27
                ->end()
28
            ->end();
29
30
        return $treeBuilder;
31
    }
32
}
33