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