DLSitemapConfiguration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 20
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 14 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