Completed
Push — master ( f5068e...e4f693 )
by Petre
02:00
created

DLSitemapConfiguration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 10
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace DL\SitemapBundle\DependencyInjection;
5
6
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
7
use Symfony\Component\Config\Definition\ConfigurationInterface;
8
9
/**
10
 * Bundle semantic configuration.
11
 *
12
 * @package DL\SitemapBundle\DependencyInjection
13
 * @author  Petre Pătrașc <[email protected]>
14
 */
15
class DLSitemapConfiguration implements ConfigurationInterface
16
{
17
    /**
18
     * @inheritDoc
19
     */
20 3
    public function getConfigTreeBuilder(): TreeBuilder
21
    {
22 3
        $treeBuilder = new TreeBuilder;
23 3
        $rootNode = $treeBuilder->root('dl_sitemap');
24
25
        $rootNode
26 3
            ->children()
27 3
                ->scalarNode('location_prefix')
28 3
                    ->defaultValue('')
29 3
                    ->end()
30 3
            ->end();
31
32 3
        return $treeBuilder;
33
    }
34
}
35