Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 4
Bugs 2 Features 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 26
rs 10
c 4
b 2
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 20 1
1
<?php
2
3
/*
4
 * This file is part of the LoopBackApiBundle package.
5
 *
6
 * (c) Théo FIDRY <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Fidry\LoopBackApiBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * The configuration of the bundle.
19
 *
20
 * @author Théo FIDRY <[email protected]>
21
 */
22
class Configuration implements ConfigurationInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function getConfigTreeBuilder()
28
    {
29
        $treeBuilder = new TreeBuilder();
30
        $rootNode = $treeBuilder->root('loopback_api');
31
32
        $rootNode
33
            ->children()
34
                ->arrayNode('parameters')
35
                    ->addDefaultsIfNotSet()
36
                    ->children()
37
                        ->scalarNode('filter')->defaultValue('filter')->info('Keyword for the filter.')->end()
38
                        ->scalarNode('search_filter')->defaultValue('where')->info('Keyword for the search filter.')->end()
39
                        ->scalarNode('order_filter')->defaultValue('order')->info('Keyword for the search filter.')
40
            ->end()
41
                    ->end()
42
                ->end()
43
            ->end();
44
45
        return $treeBuilder;
46
    }
47
}
48