Completed
Push — develop ( d322ef...d5777f )
by Baptiste
07:26
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 16 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\CommandBusBundle\DependencyInjection;
5
6
use Symfony\Component\Config\Definition\{
7
    Builder\TreeBuilder,
8
    ConfigurationInterface
9
};
10
11
final class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function getConfigTreeBuilder()
17
    {
18
        $treeBuilder = new TreeBuilder;
19
        $root = $treeBuilder->root('innmind_command_bus');
20
21
        $root
22
            ->children()
23
                ->arrayNode('stack')
24
                    ->requiresAtLeastOneElement()
25
                    ->defaultValue(['queue', 'default'])
26
                    ->prototype('scalar')->end()
27
                ->end()
28
            ->end();
29
30
        return $treeBuilder;
31
    }
32
}
33