Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 37
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 31 1
1
<?php
2
3
namespace Dontdrinkandroot\Gitki\WebBundle\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
    /**
11
     * {@inheritdoc}
12
     */
13
    public function getConfigTreeBuilder()
14
    {
15
        $treeBuilder = new TreeBuilder();
16
        $rootNode = $treeBuilder->root('ddr_gitki_web');
0 ignored issues
show
Deprecated Code introduced by
The method Symfony\Component\Config...der\TreeBuilder::root() has been deprecated with message: since Symfony 4.3, pass the root name to the constructor instead

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
17
18
        // @formatter:off
19
        $rootNode
20
            ->children()
21
                ->arrayNode('authentication')
22
                    ->children()
23
                        ->booleanNode('form_login_enabled')->defaultTrue()->end()
24
                        ->arrayNode('oauth')
25
                            ->children()
26
                                ->scalarNode('default_provider')->end()
27
                                ->arrayNode('providers')
28
                                    ->prototype('array')
29
                                        ->children()
30
                                            ->scalarNode('client_id')->isRequired()->end()
31
                                            ->scalarNode('secret')->isRequired()->end()
32
                                        ->end()
33
                                    ->end()
34
                                ->end()
35
                            ->end()
36
                        ->end()
37
                    ->end()
38
                ->end()
39
            ->end();
40
        // @formatter:on
41
42
        return $treeBuilder;
43
    }
44
}
45