KernelConfiguration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 33
ccs 26
cts 26
cp 1
rs 10
c 1
b 1
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigNode() 0 30 1
1
<?php
2
namespace Yoanm\Behat3SymfonyExtension\ServiceContainer\Configuration;
3
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Yoanm\BehatUtilsExtension\ServiceContainer\Configuration\ConfigurationInterface;
6
7
class KernelConfiguration implements ConfigurationInterface
8
{
9 4
    public function getConfigNode()
10
    {
11 4
        $treeBuilder = new TreeBuilder();
12 4
        $rootNode = $treeBuilder->root('kernel');
13
        $rootNode
14 4
            ->addDefaultsIfNotSet()
15 4
            ->children()
16 4
                ->scalarNode('bootstrap')
17 4
                    ->defaultValue('app/autoload.php')
18 4
                ->end()
19 4
                ->scalarNode('path')
20 4
                    ->defaultValue('app/AppKernel.php')
21 4
                ->end()
22 4
                ->scalarNode('class')
23 4
                    ->defaultValue('AppKernel')
24 4
                ->end()
25 4
                ->scalarNode('env')
26 4
                    ->defaultValue('test')
27 4
                ->end()
28 4
                ->booleanNode('debug')
29 4
                    ->defaultTrue()
30 4
                ->end()
31 4
                ->booleanNode('reboot')
32 4
                    ->info('If true symfony kernel will be rebooted after each scenario/example')
33 4
                    ->defaultTrue()
34 4
                ->end()
35 4
            ->end();
36
37 4
        return $rootNode;
38
    }
39
}
40