Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 23
dl 0
loc 35
rs 10
c 0
b 0
f 0
ccs 22
cts 22
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 30 1
1
<?php
2
3
/*
4
 * This file is part of the FabienCrassat\CurriculumVitaeBundle Symfony bundle.
5
 *
6
 * (c) Fabien Crassat <[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 FabienCrassat\CurriculumVitaeBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * This is the class that validates and merges configuration from your app/config files
19
 *
20
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
21
 */
22
class Configuration implements ConfigurationInterface
23
{
24
    /**
25
     * {@inheritDoc}
26
     */
27 4
    public function getConfigTreeBuilder()
28
    {
29 4
        $treeBuilder = new TreeBuilder();
30 4
        $rootNode    = $treeBuilder->root('fabien_crassat_curriculum_vitae');
31
32
        // Here you should define the parameters that are allowed to
33
        // configure your bundle. See the documentation linked above for
34
        // more information on that topic.
35
        $rootNode
36 4
            ->children()
37 4
                ->scalarNode('path_to_cv')
38 4
                    ->info('Defines the path where the bundle grabs the curriculum vitae xml files')
39 4
                    ->example('%kernel.root_dir%\..\src\Acme\HelloBundle\Resources\CV')
40 4
                ->end()
41 4
                ->scalarNode('custo_default_cv')
42 4
                    ->info('It is the default curriculum vitae xml file called without route')
43 4
                    ->example('mycv')
44 4
                ->end()
45 4
                ->scalarNode('default_lang')
46 4
                    ->info('It is the default curriculum vitae language')
47 4
                    ->example('en')
48 4
                ->end()
49 4
                ->scalarNode('template')
50 4
                    ->info('Defines your own twig template for your curriculum vitae')
51 4
                    ->example('AcmeHelloBundle:CV:index.html.twig')
52 4
                ->end()
53 4
            ->end()
54
        ;
55
56 4
        return $treeBuilder;
57
    }
58
}
59