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
lcom 0
cbo 3
dl 0
loc 22
ccs 10
cts 10
cp 1
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 16 1
1
<?php
2
3
namespace Savchenko\Bundle\OpenWeatherMapBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * {@inheritdoc}
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 1
    public function getConfigTreeBuilder()
17
    {
18 1
        $treeBuilder = new TreeBuilder();
19 1
        $rootNode = $treeBuilder->root('savchenko_open_weather_map');
20
21
        $rootNode
22 1
            ->children()
23 1
                ->scalarNode('api_key')
24 1
                    ->isRequired()
25 1
                    ->cannotBeEmpty()
26 1
                ->end()
27 1
            ->end()
28
        ;
29
30 1
        return $treeBuilder;
31
    }
32
}
33