Completed
Push — master ( c971ff...a4e58c )
by Peter
03:32
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 92.86%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 20
ccs 13
cts 14
cp 0.9286
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 17 1
1
<?php
2
/**
3
 * AnimeDb package
4
 *
5
 * @package   AnimeDb
6
 * @author    Peter Gribanov <[email protected]>
7
 * @copyright Copyright (c) 2011, Peter Gribanov
8
 * @license   http://opensource.org/licenses/GPL-3.0 GPL v3
9
 */
10
11
namespace AnimeDb\Bundle\PaginationBundle\DependencyInjection;
12
13
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
14
use Symfony\Component\Config\Definition\ConfigurationInterface;
15
16
/**
17
 * Class Configuration
18
 * @package AnimeDb\Bundle\PaginationBundle\DependencyInjection
19
 */
20
class Configuration implements ConfigurationInterface
21
{
22 1
    public function getConfigTreeBuilder()
23
    {
24
        $builder = new TreeBuilder();
25 1
        $builder->root('anime_db_pagination')
26 1
            ->addDefaultsIfNotSet()
27 1
            ->children()
28 1
                ->scalarNode('max_navigate')
29 1
                    ->defaultValue(5)
30 1
                ->end()
31 1
                ->scalarNode('template')
32 1
                    ->defaultValue('AnimeDbPaginationBundle::pagination.html.twig')
33 1
                ->end()
34 1
            ->end()
35 1
        ;
36
37 1
        return $builder;
38
    }
39
}
40