Completed
Push — master ( f27e2e...5dd696 )
by Asmir
10s
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 88
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 88
ccs 68
cts 68
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 85 1
1
<?php
2
namespace GoetasWebservices\SoapServices\SoapClient\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 2
    public function getConfigTreeBuilder()
10
    {
11 2
        $treeBuilder = new TreeBuilder();
12 2
        $rootNode = $treeBuilder->root('soap_client');
13
        $rootNode
14 2
            ->children()
15 2
                ->arrayNode('alternative_endpoints')->fixXmlConfig('alternative_endpoint')
16 2
                    ->prototype('array')
17 2
                        ->prototype('scalar')
18 2
                        ->end()
19 2
                    ->end()
20 2
                ->end()
21 2
                ->scalarNode('unwrap_returns')
22 2
                    ->defaultValue(false)
23 2
                ->end()
24
25
26
27
28
29 2
                ->scalarNode('naming_strategy')
30 2
                    ->defaultValue('short')
31 2
                    ->cannotBeEmpty()
32 2
                ->end()
33 2
                ->scalarNode('path_generator')
34 2
                    ->defaultValue('psr4')
35 2
                    ->cannotBeEmpty()
36 2
                ->end()
37 2
                ->arrayNode('namespaces')->fixXmlConfig('namespace')
38 2
                    ->cannotBeEmpty()->isRequired()
39 2
                    ->requiresAtLeastOneElement()
40 2
                    ->prototype('scalar')
41 2
                    ->end()
42 2
                ->end()
43 2
                ->arrayNode('known_locations')->fixXmlConfig('known_location')
44 2
                    ->prototype('scalar')
45 2
                    ->end()
46 2
                ->end()
47 2
                ->arrayNode('destinations_php')->fixXmlConfig('destination_php')
48 2
                    ->cannotBeEmpty()->isRequired()
49 2
                    ->requiresAtLeastOneElement()
50 2
                    ->prototype('scalar')
51 2
                    ->end()
52 2
                ->end()
53 2
                ->arrayNode('destinations_jms')->fixXmlConfig('destination_jms')
54 2
                    ->cannotBeEmpty()->isRequired()
55 2
                    ->requiresAtLeastOneElement()
56 2
                    ->prototype('scalar')
57 2
                    ->end()
58 2
                ->end()
59 2
                ->arrayNode('aliases')->fixXmlConfig('alias')
60 2
                    ->prototype('array')
61 2
                        ->prototype('scalar')
62 2
                        ->end()
63 2
                    ->end()
64 2
                ->end()
65
66
67
68 2
                ->scalarNode('headers')
69 2
                    ->defaultValue('\\SoapEnvelope\\Headers')
70 2
                    ->cannotBeEmpty()
71 2
                ->end()
72 2
                ->scalarNode('parts')
73 2
                    ->defaultValue('\\SoapEnvelope\\Parts')
74 2
                    ->cannotBeEmpty()
75 2
                ->end()
76 2
                ->scalarNode('messages')
77 2
                    ->defaultValue('\\SoapEnvelope\\Messages')
78 2
                    ->cannotBeEmpty()
79 2
                ->end()
80 2
                ->arrayNode('metadata')->fixXmlConfig('metadata')
81 2
                    ->cannotBeEmpty()->isRequired()
82 2
                    ->requiresAtLeastOneElement()
83 2
                    ->prototype('scalar')->end()
84 2
                ->end()
85
86
87
88
89
90 2
            ->end()
91
        ;
92 2
        return $treeBuilder;
93
    }
94
}
95