Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 21
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 21
rs 9.7
1
<?php
2
3
namespace MetroMarkets\FFBundle\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('metro_markets_ff_bundle');
13
14
        $treeBuilder->getRootNode()
15
            ->children()
16
                ->scalarNode('provider')->defaultValue('null')->end()
17
                ->scalarNode('cache_driver')->end()
18
                ->arrayNode('configcat')
19
                    ->children()
20
                        ->scalarNode('sdk_key')->end()
21
                    ->end()
22
                ->end()
23
                ->arrayNode('rest')
24
                    ->children()
25
                        ->scalarNode('endpoint')->end()
26
                    ->end()
27
                ->end()
28
            ->end();
29
30
        return $treeBuilder;
31
    }
32
}