Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 12
c 1
b 0
f 0
dl 0
loc 18
ccs 11
cts 11
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 16 1
1
<?php
2
3
/*
4
 * This file is part of the U2F Security bundle.
5
 *
6
 * (c) Michael Barbey <[email protected]>
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 Mbarbey\U2fSecurityBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
class Configuration implements ConfigurationInterface
18
{
19 3
    public function getConfigTreeBuilder()
20
    {
21 3
        $treeBuilder = new TreeBuilder();
22 3
        $rootNode = $treeBuilder->root('mbarbey_u2f_security');
23
24
        $rootNode
25 3
            ->children()
26 3
                ->scalarNode('authentication_route')
27 3
                    ->isRequired()
28 3
                    ->cannotBeEmpty()
29 3
                ->end()
30 3
                ->arrayNode('whitelist_routes')->scalarPrototype()->end()
31 3
            ->end()
32
        ;
33
34 3
        return $treeBuilder;
35
    }
36
}