Completed
Push — master ( aeaead...324ed1 )
by Koen
04:45
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
rs 9.4285
cc 1
eloc 10
nc 1
nop 0
1
<?php
2
3
namespace Ikoene\MarvelApiBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Class Configuration
10
 * @package Ikoene\MarvelApiBundle\DependencyInjection
11
 */
12
class Configuration implements ConfigurationInterface
13
{
14
    /**
15
     * {@inheritDoc}
16
     */
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder();
20
        $rootNode = $treeBuilder->root('ikoene_marvel_api');
21
        $rootNode
22
            ->children()
23
            ->scalarNode('public_api_key')->isRequired()->end()
24
            ->scalarNode('private_api_key')->isRequired()->end()
25
            ->end()
26
            ->end();
27
28
        return $treeBuilder;
29
    }
30
}
31