Completed
Push — master ( cf2a09...095f44 )
by WEBEWEB
01:14
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 9.7
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the smsmode-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\SMSModeBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * Configuration
19
 *
20
 * @author webeweb <https://github.com/webeweb/>
21
 * @package WBW\Bundle\SMSModeBundle\DependencyInjection
22
 */
23
class Configuration implements ConfigurationInterface {
24
25
    /**
26
     * {@inheritDoc}
27
     */
28
    public function getConfigTreeBuilder() {
29
30
        $treeBuilder = new TreeBuilder();
31
32
        $rootNode = $treeBuilder->root("wbw_smsmode");
33
        $rootNode->children()
34
            ->arrayNode("authentication")->children()
35
            ->scalarNode("access_token")->defaultNull()->end()
36
            ->scalarNode("pseudo")->defaultNull()->end()
37
            ->scalarNode("pass")->defaultNull()->end()
38
            ->end()
39
            ->end()
40
            ->booleanNode("event_listeners")->defaultTrue()->info("Load event listeners")->end()
41
            ->end();
42
43
        return $treeBuilder;
44
    }
45
46
}
47