Passed
Push — master ( 0bf361...32fd70 )
by Pol
01:57
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 10
c 1
b 0
f 0
dl 0
loc 18
ccs 9
cts 9
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 16 1
1
<?php
2
3
/**
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @see https://github.com/ecphp
8
 */
9
10
declare(strict_types=1);
11
12
namespace EcPhp\PhpDirectiveBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
final class Configuration implements ConfigurationInterface
18
{
19 1
    public function getConfigTreeBuilder()
20
    {
21 1
        $treeBuilder = new TreeBuilder('php_directive');
22
23
        /** @var \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $rootNode */
24 1
        $rootNode = $treeBuilder->getRootNode();
25
26
        /** @phpstan-ignore-next-line */
27
        $rootNode
28 1
            ->children()
29 1
            ->scalarNode('user_ini_file')
30 1
            ->defaultValue('%env(resolve:USER_INI_FILE)%')
31 1
            ->end()
32 1
            ->end();
0 ignored issues
show
Bug introduced by
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 1
        return $treeBuilder;
35
    }
36
}
37