ListGroupRequestConfiguration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 22 1
1
<?php
2
namespace OmnideskBundle\Configuration\Group;
3
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Symfony\Component\Config\Definition\ConfigurationInterface;
6
7
/**
8
 * Class ListGroupRequestConfiguration
9
 * @package OmnideskBundle\Configuration\Group
10
 */
11
class ListGroupRequestConfiguration implements ConfigurationInterface
12
{
13
    /**
14
     * @return TreeBuilder
15
     */
16
    public function getConfigTreeBuilder()
17
    {
18
        $treeBuilder = new TreeBuilder();
19
20
        $rootNode = $treeBuilder->root('params');
21
22
        $rootNode
23
            ->children()
24
                ->integerNode('page')
25
                    ->defaultValue(1)
26
                    ->min(1)
27
                ->end()
28
                ->integerNode('limit')
29
                    ->defaultValue(100)
30
                    ->min(1)
31
                    ->max(100)
32
                ->end()
33
            ->end();
34
35
36
        return $treeBuilder;
37
    }
38
}
39