Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 17
c 1
b 0
f 0
dl 0
loc 23
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 20 1
1
<?php
2
3
namespace pjpawel\Magis\MagisBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * @codeCoverageIgnore
10
 *
11
 * @author Paweł Podgórski <[email protected]>
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
16
    public function getConfigTreeBuilder(): TreeBuilder
17
    {
18
        $treeBuilder = new TreeBuilder('magis');
19
        $treeBuilder->getRootNode()
20
            ->fixXmlConfig('service')
0 ignored issues
show
Bug introduced by
The method fixXmlConfig() does not exist on Symfony\Component\Config...\Builder\NodeDefinition. It seems like you code against a sub-type of Symfony\Component\Config...\Builder\NodeDefinition such as Symfony\Component\Config...der\ArrayNodeDefinition. ( Ignorable by Annotation )

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

20
            ->/** @scrutinizer ignore-call */ fixXmlConfig('service')
Loading history...
21
            ->children()
22
                ->scalarNode('template_path')->defaultValue('%kernel.project_dir%/templates')->isRequired()->end()
23
                ->scalarNode('default_view_mode')->defaultValue('direct')->isRequired()->end()
24
                ->arrayNode('services')
25
                    ->arrayPrototype()
26
                        ->children()
27
                            ->scalarNode('alias')->end()
28
                            ->scalarNode('service_class')->end()
29
                        ->end()
30
                    ->end()
31
                ->end()
32
            ->end()
33
        ;
34
35
        return $treeBuilder;
36
    }
37
38
}