Completed
Push — master ( cd6d5c...fa5688 )
by Axel
05:46 queued 03:12
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 20
ccs 0
cts 20
cp 0
rs 9.4285
cc 1
eloc 17
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Developtech\AgilityBundle\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
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function getConfigTreeBuilder()
19
    {
20
        $treeBuilder = new TreeBuilder();
21
        $rootNode = $treeBuilder->root('developtech_agility');
22
        $rootNode
23
            ->children()
24
                ->arrayNode('model')->isRequired()
25
                    ->children()
26
                        ->arrayNode('class')->isRequired()
27
                            ->children()
28
                                ->scalarNode('project')->isRequired()->end()
29
                                ->scalarNode('feature')->isRequired()->end()
30
                            ->end()
31
                        ->end()
32
                    ->end()
33
                ->end()
34
            ->end()
35
        ;
36
        return $treeBuilder;
37
    }
38
}
39