Completed
Push — master ( b95763...2cb7d7 )
by Nikola
29:49
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 25
wmc 1
lcom 0
cbo 5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 19 1
1
<?php
2
/*
3
 * This file is part of the QueryResourcesLoaderBundle, an RunOpenCode project.
4
 *
5
 * (c) 2016 RunOpenCode
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace RunOpenCode\Bundle\QueryResourcesLoader\DependencyInjection\Configuration;
11
12
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
13
use Symfony\Component\Config\Definition\ConfigurationInterface;
14
15
/**
16
 * Class Configuration
17
 *
18
 * Bundle configuration tree.
19
 *
20
 * @package RunOpenCode\Bundle\QueryResourcesLoader\DependencyInjection
21
 */
22
class Configuration implements ConfigurationInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function getConfigTreeBuilder()
28
    {
29
        $treeBuilder = new TreeBuilder();
30
31
        $rootNode = $treeBuilder->root('run_open_code_query_resources_loader');
32
33
        $rootNode
34
            ->addDefaultsIfNotSet()
35
            ->children()
36
                ->scalarNode('default_executor')
37
                    ->defaultValue(null)
38
                    ->info('Default executor that will be used in "execute" calls. If not stated, first registered executor will be default one.')
39
                ->end()
40
                ->append(new TwigNodeDefinition())
41
            ->end()
42
            ;
43
44
        return $treeBuilder;
45
    }
46
}
47