Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 15
nc 1
nop 0
dl 0
loc 20
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace KonstantinKuklin\AsseticStaticGzipBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Class Configuration
10
 *
11
 * @author KonstantinKuklin <[email protected]>
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function getConfigTreeBuilder()
19
    {
20
        $treeBuilder = new TreeBuilder();
21
22
        $rootNode = $treeBuilder->root('assetic_static_gzip');
23
        $rootNode
24
            ->children()
25
                ->booleanNode('use')
26
                    ->isRequired()
27
                ->end()
28
                ->integerNode('level')
29
                    ->defaultValue(9)
30
                    ->min(0)
31
                    ->max(9)
32
                ->end()
33
            ->end()
34
        ;
35
36
        return $treeBuilder;
37
    }
38
}