Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 14 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Bugloos\QuerySortingBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
/**
11
 * @author Milad Ghofrani <[email protected]>
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    public function getConfigTreeBuilder(): TreeBuilder
16
    {
17
        $treeBuilder = new TreeBuilder('query_sorting');
18
19
        $rootNode = $treeBuilder->getRootNode();
20
21
        $rootNode
22
            ->children()
23
            ->integerNode('default_cache_time')->defaultValue(3600)->end()
24
            ->scalarNode('separator')->defaultValue('.')->end()
25
            ->end()
26
        ;
27
28
        return $treeBuilder;
29
    }
30
}
31