Passed
Push — master ( b4fb65...8688ba )
by Marcel
02:35
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 12
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the SaasProviderBundle package.
5
 * (c) Fluxter <http://fluxter.net/>
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Fluxter\SaasProviderBundle\DependencyInjection;
11
12
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
13
use Symfony\Component\Config\Definition\ConfigurationInterface;
14
15
class Configuration implements ConfigurationInterface
16
{
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder('saas_provider');
20
21
        $treeBuilder->getRootNode()
22
            ->children()
23
            ->scalarNode('client_entity')->isRequired()->cannotBeEmpty()->end()
24
            ->scalarNode('apikey')->isRequired()->cannotBeEmpty()->end()
25
            ->end()
26
            ->end();
27
28
        return $treeBuilder;
29
    }
30
}
31