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

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 12
nc 1
nop 0
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