Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 17
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 22
rs 9.7
1
<?php
2
3
namespace Avoran\RapidoBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    public function getConfigTreeBuilder()
11
    {
12
        $treeBuilder = new TreeBuilder('rapido');
13
14
        $treeBuilder->getRootNode()
15
            ->children()
16
                ->scalarNode('table_name_prefix')
17
                    ->defaultValue('read_model_')
18
                ->end()
19
                ->scalarNode('table_name_suffix')
20
                    ->defaultValue('_snapshot')
21
                ->end()
22
                ->scalarNode('id_column_name')
23
                    ->defaultValue('id')
24
                ->end()
25
                ->scalarNode('database_connection')
26
                    ->defaultValue('database_connection')
27
                ->end()
28
            ->end()
29
        ;
30
31
        return $treeBuilder;
32
    }
33
}
34