Passed
Push — master ( 071447...cb43db )
by Florian
03:35 queued 01:23
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 19
rs 9.7998
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Phauthentic\CorrelationIdBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
class Configuration implements ConfigurationInterface
11
{
12
    public function getConfigTreeBuilder(): TreeBuilder
13
    {
14
        $treeBuilder = new TreeBuilder('correlation_id');
15
16
        /* @phpstan-ignore-next-line */
17
        $treeBuilder->getRootNode()
18
            ->children()
19
                ->booleanNode('pass_through')
20
                    ->defaultValue(false)
21
                ->end()
22
                ->scalarNode('response_header_name')
0 ignored issues
show
Bug introduced by
The method scalarNode() does not exist on Symfony\Component\Config...der\NodeParentInterface. It seems like you code against a sub-type of Symfony\Component\Config...der\NodeParentInterface such as Symfony\Component\Config...ion\Builder\NodeBuilder. ( Ignorable by Annotation )

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

22
                ->/** @scrutinizer ignore-call */ scalarNode('response_header_name')
Loading history...
23
                    ->defaultValue('X-Correlation-ID')
24
                ->end()
25
                ->scalarNode('request_header_name')
26
                    ->defaultValue('X-Correlation-ID')
27
                ->end()
28
            ->end();
29
30
        return $treeBuilder;
31
    }
32
}
33