Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 3
Bugs 2 Features 0
Metric Value
wmc 1
c 3
b 2
f 0
lcom 0
cbo 3
dl 0
loc 24
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 21 1
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