Completed
Push — master ( 316dff...63e9a9 )
by Alex
11s
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 31
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 25 1
1
<?php
2
3
namespace Debril\RssAtomBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the class that validates and merges configuration from your app/config files.
10
 *
11
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritDoc}
17
     */
18
    public function getConfigTreeBuilder()
19
    {
20
        $treeBuilder = new TreeBuilder();
21
22
        $treeBuilder->root('debril_rss_atom')
23
                ->children()
24
                    ->booleanNode('private')
25
                        ->info('Change cache headers so the RSS feed is not cached by public caches (like reverse-proxies...).')
26
                        ->defaultValue(false)
27
                    ->end()
28
                    ->booleanNode('force_refresh')
29
                    ->info('Do not send 304 status if the feed has not been modified since last hit')
30
                    ->defaultValue(false)
31
                    ->end()
32
                    ->arrayNode('date_formats')
33
                        ->prototype('scalar')->end()
34
                    ->end()
35
                ->end()
36
        ;
37
38
        // Here you should define the parameters that are allowed to
39
        // configure your bundle. See the documentation linked above for
40
        // more information on that topic.
41
        return $treeBuilder;
42
    }
43
}
44