Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 2 Features 0
Metric Value
c 3
b 2
f 0
dl 0
loc 21
rs 9.3142
cc 1
eloc 16
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('middleware')
18
                    ->defaultValue(true)
19
                ->end()
20
                ->scalarNode('logstash_namespace')
21
                    ->defaultValue('elk')
22
                ->end()
23
                ->scalarNode('monolog_channel')
24
                    ->defaultValue('simple_bus_elk')
25
                ->end()
26
            ->end()
27
        ;
28
29
        return $treeBuilder;
30
    }
31
}
32