Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 42
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 36 1
1
<?php
2
3
namespace BreadcrumbsBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Class Configuration
10
 * @package BreadcrumbsBundle\DependencyInjection
11
 */
12
class Configuration implements ConfigurationInterface
13
{
14
    /**
15
     * @return TreeBuilder
16
     */
17
    public function getConfigTreeBuilder(): TreeBuilder
18
    {
19
        $treeBuilder = new TreeBuilder();
20
        $rootNode = $treeBuilder->root('breadcrumbs');
21
22
        $rootNode
23
            ->children()
24
                ->arrayNode('separator')
25
                    ->addDefaultsIfNotSet()
26
                    ->children()
27
                        ->scalarNode('value')
28
                            ->defaultValue('/')
29
                        ->end()
30
                        ->scalarNode('class')
31
                            ->defaultValue('separator')
32
                        ->end()
33
                    ->end()
34
                ->end()
35
                ->arrayNode('list')
36
                    ->addDefaultsIfNotSet()
37
                    ->children()
38
                        ->scalarNode('type')
39
                            ->defaultValue('ul')
40
                        ->end()
41
                        ->scalarNode('class')
42
                            ->defaultValue('separator')
43
                        ->end()
44
                    ->end()
45
                ->end()
46
                ->scalarNode('template')
47
                    ->defaultValue('BreadcrumbsBundle::template.html.twig')
48
                ->end()
49
            ->end();
50
51
        return $treeBuilder;
52
    }
53
}