Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 11
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 16
rs 9.9
1
<?php
2
declare(strict_types=1);
3
4
namespace GeodisBundle\DependencyInjection;
5
6
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
7
use Symfony\Component\Config\Definition\ConfigurationInterface;
8
9
/**
10
 * This is the class that validates and merges configuration from your app/config files.
11
 *
12
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
13
 */
14
class Configuration implements ConfigurationInterface
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function getConfigTreeBuilder()
20
    {
21
        $treeBuilder = new TreeBuilder('geodis_shipment');
22
        $rootNode = $treeBuilder->getRootNode();
23
24
        $rootNode
25
            ->children()
26
                ->scalarNode('baseUrl')->defaultValue('')->end()
27
                ->scalarNode('serviceRecordSend')->defaultValue('')->end()
28
                ->scalarNode('serviceValidationSend')->defaultValue('')->end()
29
                ->scalarNode('clientId')->defaultValue('')->end()
30
                ->scalarNode('clientSecret')->defaultValue('')->end()
31
            ->end()
32
            ;
33
34
        return $treeBuilder;
35
    }
36
}
37