Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 23 1
1
<?php
2
3
namespace LaFourchette\AdobeCampaignClientBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the class that validates and merges configuration from your app/config files
10
 *
11
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritDoc}
17
     */
18 1
    public function getConfigTreeBuilder()
19
    {
20 1
        $treeBuilder = new TreeBuilder();
21 1
        $rootNode = $treeBuilder->root('adobe_campaign_client');
22
23
        $rootNode
24 1
            ->children()
25 1
                ->scalarNode('base_uri')->cannotBeEmpty()->isRequired()->end()
26 1
                ->scalarNode('login')->end()
27 1
                ->scalarNode('password')->end()
28 1
                ->arrayNode('schemas')
29 1
                    ->prototype('array')
30 1
                        ->children()
31 1
                            ->scalarNode('name')->cannotBeEmpty()->isRequired()->end()
32 1
                            ->scalarNode('schema')->cannotBeEmpty()->isRequired()->end()
33 1
                        ->end()
34 1
                    ->end()
35 1
                ->end()
36 1
            ->end()
37
        ;
38
39 1
        return $treeBuilder;
40 1
    }
41
}
42