Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
namespace Goetas\ApacheFopBundle\DependencyInjection;
3
4
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
11
    /**
12
     * {@inheritDoc}
13
     */
14
    public function getConfigTreeBuilder()
15
    {
16
        $treeBuilder = new TreeBuilder();
17
        $rootNode = $treeBuilder->root('goetas_apache_fop');
18
        $this->readConfiguration($rootNode);
19
20
        return $treeBuilder;
21
    }
22
23
    private function readConfiguration(ArrayNodeDefinition $node)
24
    {
25
        $node->children()
26
            ->scalarNode('executable')
27
            ->defaultNull()
28
            ->end()
29
            ->scalarNode('java')
30
            ->defaultNull()
31
            ->end()
32
            ->scalarNode('config')
33
            ->defaultNull()
34
            ->end()
35
            ->end();
36
    }
37
}
38