Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 14
c 1
b 0
f 1
dl 0
loc 19
rs 9.7998
ccs 0
cts 17
cp 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Hola\AmpToolboxBundle\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
    public function getConfigTreeBuilder()
11
    {
12
        $treeBuilder = new TreeBuilder('amp_toolbox');
13
14
        $treeBuilder->getRootNode()
15
            ->children()
16
                ->booleanNode('transform_enabled')->defaultFalse()
17
            ->end()
18
            ->end()
19
            ->children()
20
                ->arrayNode('error')
21
                    ->children()
22
                        ->booleanNode('log_enabled')->end()
23
                    ->end()
24
                ->end()
25
            ->end()
26
        ;
27
28
        return $treeBuilder;
29
    }
30
}