Passed
Push — master ( 96d9d3...930d7e )
by Theo
07:33 queued 12s
created

Configuration   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 7
c 3
b 0
f 0
dl 0
loc 16
ccs 5
cts 6
cp 0.8333
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 11 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace CalendarBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
/**
11
 * This is the class that validates and merges configuration from your app/config files.
12
 *
13
 * To learn more see {@link https://symfony.com/doc/current/bundles/extension.html}
14
 */
15
class Configuration implements ConfigurationInterface
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 1
    public function getConfigTreeBuilder(): TreeBuilder
21
    {
22 1
        $treeBuilder = new TreeBuilder('maker');
23 1
        if (method_exists($treeBuilder, 'getRootNode')) {
24 1
            $treeBuilder->getRootNode();
25
        } else {
26
            // BC layer for symfony/config 4.1 and older
27
            $treeBuilder->root('maker');
0 ignored issues
show
Deprecated Code introduced by
The function Symfony\Component\Config...der\TreeBuilder::root() has been deprecated: since Symfony 4.3, pass the root name to the constructor instead ( Ignorable by Annotation )

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

27
            /** @scrutinizer ignore-deprecated */ $treeBuilder->root('maker');

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
28
        }
29
30 1
        return $treeBuilder;
31
    }
32
}
33