Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 8
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 13
ccs 10
cts 10
cp 1
crap 1
rs 9.4285
1
<?php
2
3
/*
4
 * This file is part of the puli/symfony-bundle package.
5
 *
6
 * (c) Bernhard Schussek <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Puli\SymfonyBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * @since  1.0
19
 *
20
 * @author Bernhard Schussek <[email protected]>
21
 */
22
class Configuration implements ConfigurationInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 3
    public function getConfigTreeBuilder()
28
    {
29 3
        $treeBuilder = new TreeBuilder();
30 8
        $rootNode = $treeBuilder->root('puli');
31
32 5
        $rootNode
33 8
            ->children()
34 3
                ->booleanNode('twig')->defaultTrue()->end()
35 3
            ->end()
36 2
        ;
37 2
38 5
        return $treeBuilder;
39
    }
40
}
41