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

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 15
c 1
b 0
f 0
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 19 1
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