Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 24
c 2
b 0
f 0
dl 0
loc 34
ccs 23
cts 23
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 29 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace drupol\CasBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
/**
11
 * Class Configuration.
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18 2
    public function getConfigTreeBuilder()
19
    {
20 2
        $treeBuilder = new TreeBuilder('cas');
21
22
        /** @var \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $rootNode */
23 2
        $rootNode = $treeBuilder->getRootNode();
24
25
        $rootNode
26 2
            ->children()
27 2
            ->scalarNode('base_url')->defaultValue('')->end()
28 2
            ->arrayNode('protocol')
0 ignored issues
show
Bug introduced by
The method arrayNode() does not exist on Symfony\Component\Config...der\NodeParentInterface. It seems like you code against a sub-type of Symfony\Component\Config...der\NodeParentInterface such as Symfony\Component\Config...ion\Builder\NodeBuilder. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
            ->/** @scrutinizer ignore-call */ arrayNode('protocol')
Loading history...
29 2
            ->useAttributeAsKey('name')
30 2
            ->arrayPrototype()
31 2
            ->children()
32 2
            ->scalarNode('path')
33 2
            ->isRequired()
34 2
            ->cannotBeEmpty()
35 2
            ->end()
36 2
            ->arrayNode('allowed_parameters')
37 2
            ->defaultValue([])
38 2
            ->scalarPrototype()->end()
39 2
            ->end()
40 2
            ->arrayNode('default_parameters')
41 2
            ->defaultValue([])
42 2
            ->scalarPrototype()->end()
43 2
            ->end()
44 2
            ->end();
45
46 2
        return $treeBuilder;
47
    }
48
}
49