Configuration::getConfigTreeBuilder()   A
last analyzed

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
10
namespace AnimeDb\Bundle\PaginationBundle\DependencyInjection;
11
12
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
13
use Symfony\Component\Config\Definition\ConfigurationInterface;
14
15
class Configuration implements ConfigurationInterface
16
{
17 1
    public function getConfigTreeBuilder()
18
    {
19 1
        $builder = new TreeBuilder();
20 1
        $builder->root('anime_db_pagination')
21 1
            ->addDefaultsIfNotSet()
22 1
            ->children()
23 1
                ->scalarNode('max_navigate')
24 1
                    ->defaultValue(5)
25 1
                ->end()
26 1
                ->scalarNode('template')
27 1
                    ->defaultValue('AnimeDbPaginationBundle::pagination.html.twig')
28 1
                ->end()
29 1
            ->end();
30
31 1
        return $builder;
32
    }
33
}
34