Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 23
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 9.0856
c 0
b 0
f 0
cc 1
eloc 19
nc 1
nop 0
1
<?php
2
namespace PimpayBundle\DependencyInjection;
3
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Symfony\Component\Config\Definition\ConfigurationInterface;
6
7
/**
8
 * Class Configuration
9
 * @package PimpayBundle\DependencyInjection
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * @return TreeBuilder
15
     */
16
    public function getConfigTreeBuilder(): TreeBuilder
17
    {
18
        $treeBuilder = new TreeBuilder();
19
20
        $rootNode = $treeBuilder->root('pimpay');
21
        $rootNode
22
            ->children()
23
                ->scalarNode('token')
24
                    ->isRequired()
25
                ->end()
26
                ->scalarNode('path_key')
27
                    ->isRequired()
28
                ->end()
29
                ->scalarNode('passphrase')
30
                    ->isRequired()
31
                ->end()
32
                ->scalarNode('hash')
33
                    ->isRequired()
34
                ->end()
35
            ->end();
36
37
        return $treeBuilder;
38
    }
39
}
40