Completed
Push — master ( 03a8c3...2d8113 )
by Peter
02:49
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 13
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 16
ccs 13
cts 13
cp 1
rs 9.4285
cc 1
eloc 13
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/MIT
8
 */
9
namespace AnimeDb\Bundle\PaginationBundle\DependencyInjection;
10
11
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
12
use Symfony\Component\Config\Definition\ConfigurationInterface;
13
14
/**
15
 * Class Configuration.
16
 */
17
class Configuration implements ConfigurationInterface
18
{
19 1
    public function getConfigTreeBuilder()
20
    {
21 1
        $builder = new TreeBuilder();
22 1
        $builder->root('anime_db_pagination')
23 1
            ->addDefaultsIfNotSet()
24 1
            ->children()
25 1
                ->scalarNode('max_navigate')
26 1
                    ->defaultValue(5)
27 1
                ->end()
28 1
                ->scalarNode('template')
29 1
                    ->defaultValue('AnimeDbPaginationBundle::pagination.html.twig')
30 1
                ->end()
31 1
            ->end();
32
33 1
        return $builder;
34
    }
35
}
36