Configuration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 34
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getConfigTreeBuilder() 0 18 1
1
<?php
2
3
namespace CallCenter\Bundle\CommonBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    private $debug;
11
12
    /**
13
     * @param bool $debug Whether debugging is enabled or not
14
     */
15
    public function __construct($debug)
16
    {
17
        $this->debug = (bool) $debug;
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function getConfigTreeBuilder()
24
    {
25
        $treeBuilder = new TreeBuilder();
26
        $rootNode = $treeBuilder->root('call_center_platform');
27
28
        $rootNode
29
            ->children()
30
                ->arrayNode('twitter')
31
                    ->children()
32
                        ->integerNode('client_id')->end()
33
                        ->scalarNode('client_secret')->end()
34
                    ->end()
35
                ->end()
36
            ->end()
37
        ;
38
39
        return $treeBuilder;
40
    }
41
}
42