Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 32
Code Lines 28

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 28
nc 1
nop 0
dl 0
loc 32
rs 9.472
c 0
b 0
f 0
1
<?php
2
3
namespace Sitetheory\Bundle\ProfilerStorageBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Class Configuration.
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function getConfigTreeBuilder()
17
    {
18
        $treeBuilder = new TreeBuilder();
19
        $rootNode = $treeBuilder->root('sitetheory_profiler_storage');
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

19
        $rootNode = /** @scrutinizer ignore-deprecated */ $treeBuilder->root('sitetheory_profiler_storage');

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...
20
21
        $rootNode
22
            ->children()
23
                ->arrayNode('profiler')
24
                    ->addDefaultsIfNotSet()
25
                    ->children()
26
                        ->booleanNode('defaultStorage')
27
                            ->defaultTrue()
28
                    ->end()
29
                    ->scalarNode('class')
30
                        ->defaultValue('')
31
                    ->end()
32
                    ->scalarNode('dsn')
33
                        ->defaultValue('')
34
                    ->end()
35
                    ->scalarNode('username')
36
                        ->defaultValue('')
37
                    ->end()
38
                    ->scalarNode('password')
39
                        ->defaultValue('')
40
                    ->end()
41
                    ->scalarNode('ttl')
42
                        ->defaultValue('3600')
43
                    ->end()
44
                ->end()
45
            ->end();
46
47
        return $treeBuilder;
48
    }
49
}
50