Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 55
dl 0
loc 62
ccs 54
cts 54
cp 1
rs 10
c 2
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 60 1
1
<?php
2
3
namespace LAG\SmokerBundle\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 1
    public function getConfigTreeBuilder()
11
    {
12 1
        $treeBuilder = new TreeBuilder();
13 1
        $root = $treeBuilder->root('lag_smoke');
0 ignored issues
show
Deprecated Code introduced by
The function Symfony\Component\Config...der\TreeBuilder::root() has been deprecated: since Symfony 4.3, pass the root name to the constructor instead ( Ignorable by Annotation )

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

13
        $root = /** @scrutinizer ignore-deprecated */ $treeBuilder->root('lag_smoke');

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

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

Loading history...
14
15
        $root
16 1
            ->children()
17 1
                ->arrayNode('routing')
18 1
                    ->addDefaultsIfNotSet()
19 1
                    ->children()
20 1
                        ->scalarNode('scheme')
21 1
                            ->defaultValue('http')
22 1
                        ->end()
23 1
                        ->scalarNode('host')
24 1
                            ->defaultValue('127.0.0.1')
25 1
                        ->end()
26 1
                        ->scalarNode('port')
27 1
                            ->defaultValue('8000')
28 1
                        ->end()
29 1
                        ->scalarNode('base_url')
30 1
                            ->defaultValue('')
31 1
                        ->end()
32 1
                    ->end()
33 1
                ->end()
34 1
                ->arrayNode('routes')
35 1
                    ->arrayPrototype()
36 1
                        ->children()
37 1
                            ->scalarNode('mapping')->end()
38 1
                            ->arrayNode('handlers')
39 1
                                ->defaultValue([
40 1
                                    'response_code' => '200',
41
                                ])
42 1
                                ->variablePrototype()->end()
43 1
                            ->end()
44 1
                        ->end()
45 1
                    ->end()
46 1
                ->end()
47 1
                ->arrayNode('mapping')
48 1
                    ->arrayPrototype()
49 1
                        ->children()
50 1
                            ->scalarNode('entity')->end()
51 1
                            ->scalarNode('pattern')->end()
52 1
                            ->scalarNode('route')->end()
53 1
                            ->scalarNode('provider')->defaultValue('doctrine')->end()
54 1
                            ->arrayNode('options')
55 1
                                ->variablePrototype()->end()
56 1
                            ->end()
57 1
                            ->arrayNode('requirements')
58 1
                                ->scalarPrototype()->end()
59 1
                            ->end()
60 1
                            ->arrayNode('excludes')
61 1
                                ->scalarPrototype()->end()
62 1
                            ->end()
63 1
                        ->end()
64 1
                    ->end()
65 1
                ->end()
66 1
            ->end()
67
        ;
68
69 1
        return $treeBuilder;
70
    }
71
}
72