Configuration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 80%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 11
ccs 4
cts 5
cp 0.8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 9 2
1
<?php
2
3
namespace Nixilla\Api\LoggerBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10 1
    public function getConfigTreeBuilder()
11
    {
12 1
        $treeBuilder = new TreeBuilder('nixilla_api_logger');
13
14 1
        if ( ! method_exists($treeBuilder, 'getRootNode')) {
15
            $treeBuilder->root('nixilla_api_logger');
0 ignored issues
show
Bug introduced by
The method root() does not exist on Symfony\Component\Config...ion\Builder\TreeBuilder. ( Ignorable by Annotation )

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

15
            $treeBuilder->/** @scrutinizer ignore-call */ 
16
                          root('nixilla_api_logger');

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
16
        }
17
18 1
        return $treeBuilder;
19
    }
20
}
21