Issues (8)

DependencyInjection/Configuration.php (1 issue)

1
<?php
2
3
namespace Xiidea\EasyConfigBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
6
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
7
use Symfony\Component\Config\Definition\ConfigurationInterface;
8
9
class Configuration implements ConfigurationInterface
10
{
11
    const ROOT_NODE_NAME = 'xiidea_easy_config';
12
13
    public function getConfigTreeBuilder(): TreeBuilder
14
    {
15
        $treeBuilder = new TreeBuilder(self::ROOT_NODE_NAME);
16
        $rootNode = $treeBuilder->getRootNode();
17
18
        $this->addRequiredConfigs($rootNode);
19
20
        return $treeBuilder;
21
    }
22
23
    private function addRequiredConfigs(ArrayNodeDefinition $rootNode)
24
    {
25
        $rootNode
26
            ->children()
27
                ->scalarNode('config_class')
28
                    ->cannotBeOverwritten()
29
                    ->isRequired()
30
                    ->cannotBeEmpty()
31
                ->end()
32
            ->end();
0 ignored issues
show
The method end() does not exist on Symfony\Component\Config...der\NodeParentInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Symfony\Component\Config...ion\Builder\TreeBuilder. Are you sure you never get one of those? ( Ignorable by Annotation )

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

32
            ->/** @scrutinizer ignore-call */ end();
Loading history...
33
    }
34
}
35