Completed
Push — master ( 512c83...eaf1c4 )
by Dmitry
25:03
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 19
ccs 14
cts 14
cp 1
rs 9.6333
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lamoda\TacticianQueueBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
/**
11
 * This is the class that validates and merges configuration from your app/config files.
12
 *
13
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
14
 */
15
class Configuration implements ConfigurationInterface
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 1
    public function getConfigTreeBuilder()
21
    {
22 1
        $treeBuilder = new TreeBuilder();
23 1
        $rootNode = $treeBuilder->root('lamoda_tactician_queue');
24
25
        $rootNode
26 1
            ->children()
27 1
                ->scalarNode('tactician_id')
28 1
                    ->defaultValue('tactician.commandbus')
29 1
                    ->info('Id of the tactician command bus service')
30 1
                ->end()
31 1
                ->scalarNode('command_serializer_id')
32 1
                    ->defaultValue('lamoda_tactician_queue.default_command_serializer')
33 1
                    ->info('Id of the Symfony serializer service used for command serialization')
34 1
                ->end()
35 1
            ->end();
36
37 1
        return $treeBuilder;
38
    }
39
}
40