Completed
Push — master ( 1f36be...d8b059 )
by Beñat
03:59
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 20 1
1
<?php
2
3
/*
4
 * This file is part of the CMS Kernel library.
5
 *
6
 * Copyright (c) 2016 LIN3S <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace LIN3S\CMSKernel\Infrastructure\LIN3SAdminBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * @author Beñat Espiña <[email protected]>
19
 */
20
class Configuration implements ConfigurationInterface
21
{
22
    public function getConfigTreeBuilder()
23
    {
24
        $treeBuilder = new TreeBuilder();
25
        $treeBuilder->root('lin3_s_cms_admin_bridge')
26
            ->children()
27
                ->arrayNode('locales')
28
                    ->children()
29
                        ->scalarNode('default')
30
                            ->isRequired(true)
31
                        ->end()
32
                        ->arrayNode('others')
33
                            ->prototype('scalar')->end()
34
                        ->end()
35
                    ->end()
36
                ->end()
37
            ->end()
38
        ->end();
39
40
        return $treeBuilder;
41
    }
42
}
43