Completed
Pull Request — master (#104)
by
unknown
04:57 queued 02:15
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 14

Duplication

Lines 17
Ratio 100 %

Importance

Changes 0
Metric Value
dl 17
loc 17
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 14
nc 1
nop 0
1
<?php
2
3
namespace eXpansion\Bundle\MxKarma\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
9
/**
10
 * Class Configuration
11
 *
12
 * @package eXpansion\Framework\AdminGroups\DependencyInjection;
13
 * @author reaby
14
 */
15 View Code Duplication
class Configuration implements ConfigurationInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
16
{
17
18
    /**
19
     * Generates the configuration tree builder.
20
     *
21
     * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
22
     */
23
    public function getConfigTreeBuilder()
24
    {
25
        $treeBuilder = new TreeBuilder();
26
        $treeBuilder->root('e_xpansion_plugins')
27
            ->children()
28
                ->arrayNode('mxkarma')
29
                    ->prototype('array')
30
                        ->children()
31
                            ->arrayNode('serverlogin')->prototype('scalar')->end()->end()
32
                            ->arrayNode('apikey')->prototype('scalar')->end()->end()
33
                        ->end()
34
                    ->end()
35
                ->end()
36
            ->end();
37
38
        return $treeBuilder;
39
    }
40
}
41