Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 11
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Everlution\NavigationBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
/**
11
 * Class Configuration.
12
 *
13
 * @author Ivan Barlog <[email protected]>
14
 */
15
class Configuration implements ConfigurationInterface
16
{
17
    const CONFIG_ROUTER_SERVICE = 'router_service';
18
19
    public function getConfigTreeBuilder()
20
    {
21
        $treeBuilder = new TreeBuilder('everlution_navigation');
22
        $treeBuilder
23
            ->getRootNode()
24
            ->children()
25
                ->scalarNode(self::CONFIG_ROUTER_SERVICE)->defaultValue('router.default')->end()
26
            ->end()
27
        ;
28
29
        return $treeBuilder;
30
    }
31
}
32