Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 14 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\RestETagBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace KleijnWeb\RestETagBundle\DependencyInjection;
10
11
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
12
use Symfony\Component\Config\Definition\ConfigurationInterface;
13
14
/**
15
 * @author John Kleijn <[email protected]>
16
 */
17
class Configuration implements ConfigurationInterface
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function getConfigTreeBuilder()
23
    {
24
        $treeBuilder = new TreeBuilder();
25
        $rootNode = $treeBuilder->root('rest_e_tags');
26
27
        $rootNode
28
            ->children()
29
            ->booleanNode('concurrency_control')->defaultFalse()->end()
30
            ->scalarNode('child_invalidation_constraint')->defaultValue('\/[0-9]+$')->end()
31
            ->scalarNode('cache')->isRequired()->defaultFalse()->end()
32
        ;
33
34
        return $treeBuilder;
35
    }
36
}
37