Issues (2)

src/DependencyInjection/Configuration.php (1 issue)

Labels
Severity
1
<?php declare(strict_types=1);
2
3
namespace Incompass\InjectionBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Class Configuration
10
 *
11
 * @author  Joe Mizzi <[email protected]>
12
 *
13
 * @codeCoverageIgnore
14
 */
15
class Configuration implements ConfigurationInterface
16
{
17
    /**
18
     * Generates the configuration tree builder.
19
     *
20
     * @return TreeBuilder The tree builder
21
     */
22
    public function getConfigTreeBuilder(): TreeBuilder
23
    {
24
        $treeBuilder = new TreeBuilder();
25
        $rootNode = $treeBuilder->root('injection');
26
        $rootNode
27
            ->addDefaultsIfNotSet()
0 ignored issues
show
The method addDefaultsIfNotSet() 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

27
            ->/** @scrutinizer ignore-call */ 
28
              addDefaultsIfNotSet()
Loading history...
28
            ->children()
29
                ->arrayNode('paths')
30
                    ->defaultValue(['src' => 'App\\'])
31
                    ->prototype('scalar')
32
                    ->end()
33
                ->end()
34
                ->arrayNode('environment_groups')
35
                    ->useAttributeAsKey('group')
36
                    ->defaultValue([])
37
                    ->arrayPrototype()
38
                    ->children()
39
                        ->arrayNode('environments')
40
                            ->scalarPrototype()
41
                            ->end()
42
                        ->end()
43
                    ->end()
44
                ->end()
45
            ->end();
46
        return $treeBuilder;
47
    }
48
}