Completed
Push — master ( f56ae9...d1d973 )
by Janusz
33:48 queued 16:16
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 30
ccs 23
cts 23
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 28 1
1
<?php
2
3
namespace FlyingColours\TwilioTwoFactorBundle\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 2
    public function getConfigTreeBuilder()
11
    {
12 2
        $treeBuilder = new TreeBuilder();
13 2
        $rootNode = $treeBuilder->root('flying_colours_twilio_two_factor');
14
15
        $rootNode
16 2
            ->children()
17 2
                ->scalarNode('form_template')->defaultValue('@SchebTwoFactor/Authentication/form.html.twig')->end()
18 2
                ->arrayNode('twilio')
19 2
                    ->addDefaultsIfNotSet()
20 2
                    ->children()
21 2
                        ->scalarNode('username')->defaultNull()->end()
22 2
                        ->scalarNode('password')->defaultNull()->end()
23 2
                    ->end()
24 2
                ->end()
25 2
                ->arrayNode('config')
26 2
                    ->addDefaultsIfNotSet()
27 2
                    ->children()
28 2
                        ->scalarNode('sms_from')->defaultNull()->end()
29 2
                        ->scalarNode('sms_message')->defaultValue('{code} is your code')->end()
30 2
                        ->scalarNode('voice_from')->defaultNull()->end()
31 2
                        ->scalarNode('voice_message_url')->defaultNull()->end()
32 2
                    ->end()
33 2
                ->end()
34 2
            ->end()
35
        ;
36
37 2
        return $treeBuilder;
38
    }
39
}
40