Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
/*
3
 * This file is part of the FreshCommonApiBundle
4
 *
5
 * (c) Artem Henvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fresh\CommonApiBundle\DependencyInjection;
14
15
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
16
use Symfony\Component\Config\Definition\ConfigurationInterface;
17
18
/**
19
 * Configuration.
20
 *
21
 * @author Artem Henvald <[email protected]>
22
 */
23
class Configuration implements ConfigurationInterface
24
{
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getConfigTreeBuilder(): TreeBuilder
29
    {
30
        $treeBuilder = new TreeBuilder();
31
32
        $rootNode = $treeBuilder->root('fresh_common_api');
33
        $rootNode
34
            ->children()
35
                ->booleanNode('enable_json_decoder')->defaultFalse()->end()
36
            ->end();
37
38
        return $treeBuilder;
39
    }
40
}
41