Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 38
ccs 23
cts 23
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 29 1
1
<?php
2
/*******************************************************************************
3
 * This file is part of the Pbxg33k\MusicInfo package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * (c) 2017 Oguzhan uysal. All rights reserved
9
 ******************************************************************************/
10
11
namespace Pbxg33k\MusicInfo\DependencyInjection;
12
13
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
14
use Symfony\Component\Config\Definition\ConfigurationInterface;
15
16
class Configuration implements ConfigurationInterface
17
{
18
19
    /**
20
     * Generates the configuration tree builder.
21
     *
22
     * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
23
     */
24 2
    public function getConfigTreeBuilder()
25
    {
26 2
        $treeBuilder = new TreeBuilder();
27 2
        $rootNode = $treeBuilder->root('music_info');
28
29
        $rootNode
30 2
            ->children()
31 2
                ->booleanNode('init_services')->defaultTrue()->end()
32 2
                ->arrayNode('services')->end()
33 2
                ->arrayNode('preferred_order')->end()
34 2
                ->arrayNode('service_weight')
35 2
                    ->prototype('array')
36 2
                        ->children()
37 2
                            ->scalarNode('service')->end()
38 2
                            ->floatNode('weight')->end()
39 2
                        ->end()
40 2
                    ->end()
41 2
                ->end()
42 2
                ->arrayNode('guzzle')
43 2
                    ->addDefaultsIfNotSet()
44 2
                    ->children()
45 2
                        ->scalarNode('proxy')->defaultNull()->end()
46 2
                    ->end()
47 2
                ->end()
48 2
            ->end()
49
        ;
50
51 2
        return $treeBuilder;
52
    }
53
}