Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 22
ccs 14
cts 14
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 19 1
1
<?php
2
3
namespace CrowdReactive\LobBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
final class Configuration implements ConfigurationInterface
9
{
10 3
    public function getConfigTreeBuilder()
11
    {
12 3
        $treeBuilder = new TreeBuilder();
13 3
        $root = $treeBuilder->root('crowd_reactive_lob', 'array');
14
15
        $root
16 3
            ->children()
17 3
                ->scalarNode('api_key')
18 3
                    ->isRequired()
19 3
                    ->cannotBeEmpty()
20 3
                    ->info('Lob.com API key')
21 3
                    ->end()
22 3
                ->scalarNode('version')
23 3
                    ->defaultNull()
24 3
                    ->info('Version of the Lob.com API to use (default is latest)')
25 3
                    ->end();
26
27 3
        return $treeBuilder;
28
    }
29
}
30