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

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
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 25
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

1 Method

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