Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 46 1
1
<?php
2
namespace GoetasWebservices\Xsd\XsdToPhp\DependencyInjection;
3
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Symfony\Component\Config\Definition\ConfigurationInterface;
6
7
class Configuration implements ConfigurationInterface
8
{
9
    public function getConfigTreeBuilder()
10
    {
11
        $treeBuilder = new TreeBuilder();
12
        $rootNode = $treeBuilder->root('xsd2php');
13
14
        $rootNode
15
            ->children()
16
            ->scalarNode('naming_strategy')
17
            ->defaultValue('short')
18
            ->cannotBeEmpty()
19
            ->end()
20
            ->scalarNode('path_generator')
21
            ->defaultValue('psr4')
22
            ->cannotBeEmpty()
23
            ->end()
24
            ->arrayNode('namespaces')->fixXmlConfig('namespace')
25
            ->cannotBeEmpty()->isRequired()
26
            ->requiresAtLeastOneElement()
27
            ->prototype('scalar')
28
            ->end()
29
            ->end()
30
            ->arrayNode('known_locations')->fixXmlConfig('known_location')
31
            ->prototype('scalar')
32
            ->end()
33
            ->end()
34
            ->arrayNode('destinations_php')->fixXmlConfig('destination')
35
            ->cannotBeEmpty()->isRequired()
36
            ->requiresAtLeastOneElement()
37
            ->prototype('scalar')
38
            ->end()
39
            ->end()
40
            ->arrayNode('destinations_jms')->fixXmlConfig('destination')
41
            ->cannotBeEmpty()->isRequired()
42
            ->requiresAtLeastOneElement()
43
            ->prototype('scalar')
44
            ->end()
45
            ->end()
46
            ->arrayNode('aliases')->fixXmlConfig('alias')
47
            ->prototype('array')
48
            ->prototype('scalar')
49
            ->end()
50
            ->end()
51
            ->end()
52
            ->end();
53
        return $treeBuilder;
54
    }
55
}
56