Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 31 1
1
<?php
2
3
namespace Fenrizbes\TypographBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    public function getConfigTreeBuilder()
11
    {
12
        $treeBuilder = new TreeBuilder();
13
        $rootNode = $treeBuilder->root('fenrizbes_typograph');
14
15
        $rootNode
16
            ->children()
17
                ->arrayNode('configs')
18
                    ->useAttributeAsKey('name')
19
20
                    ->prototype('array')
21
                        ->useAttributeAsKey('name')
22
                        ->prototype('variable')->end()
23
                    ->end()
24
25
                    ->defaultValue(array(
26
                        'default' => array(
27
                            'Text.paragraphs'           => 'off',
28
                            'Text.breakline'            => 'off',
29
                            'Text.auto_links'           => 'off',
30
                            'Text.email'                => 'off',
31
                            'OptAlign.oa_oquote'        => 'off',
32
                            'OptAlign.oa_obracket_coma' => 'off'
33
                        )
34
                    ))
35
                ->end()
36
            ->end()
37
        ;
38
39
        return $treeBuilder;
40
    }
41
}
42