Completed
Push — master ( 98c7ea...42da58 )
by Jafar
02:24
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 17
c 2
b 0
f 0
nc 1
nop 0
dl 0
loc 20
rs 9.4285
1
<?php
2
/*
3
 * This file is part of the Guarded Authentication package.
4
 *
5
 * (c) Jafar Jabr <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Jafar\Bundle\GuardedAuthenticationBundle\DependencyInjection;
12
13
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
14
use Symfony\Component\Config\Definition\ConfigurationInterface;
15
16
/**
17
 * @author Jafar Jabr <[email protected]>
18
 * Class Configuration
19
 */
20
class Configuration implements ConfigurationInterface
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function getConfigTreeBuilder()
26
    {
27
        $treeBuilder = new TreeBuilder();
28
        $rootNode    = $treeBuilder->root('jafar_guarded_authentication');
29
        $rootNode
30
            ->children()
31
            ->scalarNode('pass_phrase')
32
            ->end()
33
            ->scalarNode('token_ttl')
34
            ->end()
35
            ->scalarNode('login_route')
36
            ->end()
37
            ->scalarNode('home_page_route')
38
            ->end()
39
            ->scalarNode('api_login_route')
40
            ->end()
41
            ->scalarNode('api_home_page_route')
42
            ->end();
43
44
        return $treeBuilder;
45
    }
46
}
47