Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 11
nc 1
nop 0
1
<?php
2
3
namespace Evheniy\HTML5CacheBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Class Configuration
10
 * @package Evheniy\HTML5CacheBundle\DependencyInjection
11
 */
12
class Configuration implements ConfigurationInterface
13
{
14
    /**
15
     * @return TreeBuilder
16
     */
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder();
20
        $rootNode = $treeBuilder->root('html5_cache');
21
        $rootNode
22
            ->children()
23
                ->scalarNode('cdn')->defaultValue('')->end()
24
                ->booleanNode('http')->defaultTrue()->end()
25
                ->booleanNode('https')->defaultTrue()->end()
26
                ->arrayNode('custom_paths')->prototype('scalar')->end()->end()
27
            ->end();
28
29
        return $treeBuilder;
30
    }
31
}