Completed
Push — master ( a4e58c...d4ecfc )
by Peter
09:22
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
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 17
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
 * @package   AnimeDb
6
 * @author    Peter Gribanov <[email protected]>
7
 * @copyright Copyright (c) 2011, Peter Gribanov
8
 * @license   http://opensource.org/licenses/MIT
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 1
        $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
        ;
36
37 1
        return $builder;
38
    }
39
}
40