Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/*
3
 * This file is part of the StfalconApiBundle.
4
 *
5
 * (c) Stfalcon LLC <stfalcon.com>
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 StfalconStudio\ApiBundle\DependencyInjection;
14
15
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
16
use Symfony\Component\Config\Definition\ConfigurationInterface;
17
18
/**
19
 * Configuration.
20
 */
21
class Configuration implements ConfigurationInterface
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function getConfigTreeBuilder(): TreeBuilder
27
    {
28
        $treeBuilder = new TreeBuilder('stfalcon_api');
29
30
        $rootNode = $treeBuilder->getRootNode();
31
        $rootNode
32
            ->children()
33
                ->scalarNode('json_schema_dir')->defaultValue('%kernel.project_dir%/src/Json/Schema/')->cannotBeEmpty()->end()
34
            ->end()
35
        ;
36
37
        return $treeBuilder;
38
    }
39
}
40