Completed
Push — master ( b9975d...05326a )
by Florent
06:18 queued 51s
created

SourceConfiguration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 1
c 2
b 1
f 0
lcom 0
cbo 2
dl 0
loc 25
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 17 1
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2016 Spomky-Labs
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
namespace SpomkyLabs\JoseBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * Factory configuration for the Gaufrette DIC extension.
19
 *
20
 * @author Antoine Hérault <[email protected]>
21
 */
22
class SourceConfiguration implements ConfigurationInterface
23
{
24
    /**
25
     * Generates the configuration tree builder.
26
     *
27
     * @return TreeBuilder
28
     */
29
    public function getConfigTreeBuilder()
30
    {
31
        $treeBuilder = new TreeBuilder();
32
33
        $treeBuilder
34
            ->root('jose')
35
                ->ignoreExtraKeys()
36
                ->fixXmlConfig('key', 'keys')
37
                    ->children()
38
                        ->arrayNode('keys')
39
                        ->prototype('variable')->end()
40
                    ->end()
41
                ->end()
42
            ->end();
43
44
        return $treeBuilder;
45
    }
46
}
47