Passed
Push — master ( a2ed2b...5c220b )
by Gerard
02:12
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 11
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 15
rs 9.9
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gbere\SimpleAuth\DependencyInjection;
6
7
use Gbere\SimpleAuth\Entity\User;
8
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
9
use Symfony\Component\Config\Definition\ConfigurationInterface;
10
11
class Configuration implements ConfigurationInterface
12
{
13
    public function getConfigTreeBuilder()
14
    {
15
        $treeBuilder = new TreeBuilder('gbere_simple_auth');
16
        $rootNode = $treeBuilder->getRootNode();
17
        $rootNode
18
            ->children()
19
                ->arrayNode('user')
20
                    ->children()
21
                        ->scalarNode('entity')->defaultValue(User::class)->end()
22
                    ->end()
23
                ->end()
24
            ->end()
25
        ;
26
27
        return $treeBuilder;
28
    }
29
}
30