ExecWrapperConfiguration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 17
ccs 14
cts 14
cp 1
rs 9.4285
cc 1
eloc 15
nc 1
nop 0
crap 1
1
<?php
2
namespace ivol\Config;
3
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Symfony\Component\Config\Definition\ConfigurationInterface;
6
7
class ExecWrapperConfiguration implements ConfigurationInterface
8
{
9
10
    /**
11
     * Generates the configuration tree builder.
12
     *
13
     * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
14
     */
15 12
    public function getConfigTreeBuilder()
16
    {
17 12
        $treeBuilder = new TreeBuilder();
18 12
        $rootNode = $treeBuilder->root('exec_wrapper');
19
        $rootNode
20 12
            ->children()
21 12
                ->booleanNode('escape_shell_args')
22 12
                    ->info('Escape shell args passed to exec')
23 12
                    ->defaultTrue()
24 12
                ->end()
25 12
                ->booleanNode('escape_shell_cmd')
26 12
                    ->info('Escape shell command passed to exec')
27 12
                    ->defaultTrue()
28 12
                ->end()
29 12
            ->end();
30 12
        return $treeBuilder;
31
    }
32
}