Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 35 1
1
<?php
2
3
/**
4
 * This file is part of the Mediapart Selligent Client API
5
 *
6
 * CC BY-NC-SA <https://github.com/mediapart/selligent>
7
 *
8
 * For the full license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Mediapart\Selligent;
13
14
use Symfony\Component\Config\Definition\ConfigurationInterface;
15
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
16
17
/**
18
 * Class Configuration
19
 * @package Mediapart\Selligent
20
 */
21
class Configuration implements ConfigurationInterface
22
{
23
    /**
24
     * Define configTree
25
     * @return TreeBuilder
26
     */
27 3
    public function getConfigTreeBuilder()
28
    { 
29 3
        $treeBuilder = new TreeBuilder();
30 3
        $rootNode = $treeBuilder->root('selligent');
31
32
        $rootNode
33 3
          ->children()
34 3
            ->scalarNode('login')
35 3
                ->isRequired()
36 3
                ->cannotBeEmpty()
37 3
            ->end()
38 3
            ->scalarNode('password')
39 3
              ->isRequired()
40 3
              ->cannotBeEmpty()
41 3
            ->end()
42 3
            ->scalarNode('namespace')
43 3
                ->defaultValue('http://tempuri.org/')
44 3
            ->end()
45 3
            ->scalarNode('wsdl')
46 3
              ->isRequired()
47 3
              ->cannotBeEmpty()
48 3
            ->end()
49 3
            ->arrayNode('options')
50 3
                ->children()
51 3
                    ->arrayNode('classmap')
52 3
                        ->isRequired()
53 3
                        ->prototype('scalar')
54 3
                    ->end()
55 3
                ->end()
56 3
            ->end()
57 3
          ->end()
58
        ;
59
60 3
        return $treeBuilder;
61
    }
62
}
63