Completed
Push — master ( afc178...f9ad3c )
by Krzysztof
06:00
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 20
rs 9.4286
c 1
b 0
f 0
cc 1
eloc 15
nc 1
nop 0
1
<?php
2
3
namespace Clearcode\SimpleBusElkBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    public function getConfigTreeBuilder()
11
    {
12
        $treeBuilder = new TreeBuilder();
13
        $rootNode    = $treeBuilder->root('simple_bus_elk');
14
15
        $rootNode
16
            ->children()
17
                ->booleanNode('enable_simple_bus_middleware')
18
                    ->defaultValue(true)
19
                ->scalarNode('logstash_namespace')
20
                    ->defaultValue('elk')
21
                ->end()
22
                ->scalarNode('monolog_channel')
23
                    ->defaultValue('simple_bus_elk')
24
                ->end()
25
            ->end()
26
        ;
27
28
        return $treeBuilder;
29
    }
30
}
31