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

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 17 1
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