Configuration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 13 2
1
<?php declare(strict_types = 1);
2
3
namespace Bukashk0zzz\FilterBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the configuration class.
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * Generates the configuration tree.
15
     */
16
    public function getConfigTreeBuilder(): TreeBuilder
17
    {
18
        $treeBuilder = new TreeBuilder('bukashk0zzz_filter');
19
20
        $rootNode = \method_exists($treeBuilder, 'getRootNode')
21
            ? $treeBuilder->getRootNode()
22
            : $treeBuilder->root('bukashk0zzz_filter');
0 ignored issues
show
Bug introduced by
The method root() does not exist on Symfony\Component\Config...ion\Builder\TreeBuilder. ( Ignorable by Annotation )

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

22
            : $treeBuilder->/** @scrutinizer ignore-call */ root('bukashk0zzz_filter');

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
23
24
        $rootNode
25
            ->children()
26
            ->scalarNode('auto_filter_forms')->defaultValue(true)->end();
27
28
        return $treeBuilder;
29
    }
30
}
31