Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 8
Bugs 2 Features 2
Metric Value
wmc 1
c 8
b 2
f 2
lcom 0
cbo 3
dl 0
loc 23
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 15 1
1
<?php
2
namespace Vresh\TwilioBundle\DependencyInjection;
3
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Symfony\Component\Config\Definition\ConfigurationInterface;
6
7
/**
8
 * This file is part of the VreshTwilioBundle.
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 *
13
 * @author Fridolin Koch <[email protected]>
14
 */
15
class Configuration implements ConfigurationInterface
16
{
17
    /**
18
     * Generates the configuration tree.
19
     *
20
     * @return \Symfony\Component\Config\Definition\NodeInterface
21
     */
22
    public function getConfigTreeBuilder()
23
    {
24
        $treeBuilder = new TreeBuilder();
25
        $rootNode = $treeBuilder->root('twilio');
26
27
        $rootNode
28
            ->children()
29
            ->scalarNode('sid')->isRequired()->end()
30
            ->scalarNode('authToken')->isRequired()->end()
31
            ->scalarNode('version')->defaultValue('2010-04-01')->end()
32
            ->scalarNode('retryAttempts')->defaultValue(1)->end()
33
            ->end();
34
35
        return $treeBuilder;
36
    }
37
}
38