Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 28
ccs 18
cts 18
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 22 1
1
<?php
2
3
namespace Happyr\SimpleBusBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the class that validates and merges configuration from your app/config files.
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 1
    public function getConfigTreeBuilder()
17
    {
18 1
        $treeBuilder = new TreeBuilder();
19 1
        $root = $treeBuilder->root('happyr_simplebus');
20
21 1
        $root->children()
22 1
            ->arrayNode('auto_register_handlers')->addDefaultsIfNotSet()->children()
23 1
                ->booleanNode('enabled')->defaultTrue()->end()
24 1
                ->scalarNode('command_namespace')->defaultNull()->end()
25 1
                ->scalarNode('command_handler_namespace')->defaultNull()->end()
26 1
                ->scalarNode('command_handler_path')->defaultNull()->end()
27 1
            ->end()->end()
28 1
            ->arrayNode('auto_register_event_subscribers')->addDefaultsIfNotSet()->children()
29 1
                ->booleanNode('enabled')->defaultTrue()->end()
30 1
                ->scalarNode('event_subscriber_namespace')->defaultNull()->end()
31 1
                ->scalarNode('event_subscriber_path')->defaultNull()->end()
32 1
            ->end()->end()
33 1
            ->booleanNode('use_direct_publisher')->defaultFalse()->end()
34 1
        ->end();
35
36 1
        return $treeBuilder;
37
    }
38
}
39