Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 11
rs 9.4286
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace Evheniy\GtmBundle\DependencyInjection;
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Symfony\Component\Config\Definition\ConfigurationInterface;
6
7
/**
8
 * Class Configuration
9
 * @package Evheniy\GtmBundle\DependencyInjection
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * @return TreeBuilder
15
     */
16
    public function getConfigTreeBuilder()
17
    {
18
        $treeBuilder = new TreeBuilder();
19
        $rootNode = $treeBuilder->root('gtm');
20
        $rootNode
21
            ->children()
22
                ->scalarNode('id')->isRequired()->cannotBeEmpty()->end()
23
            ->end();
24
25
        return $treeBuilder;
26
    }
27
}