Completed
Push — upgrade ( c4e463 )
by Kamil
22:47
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 23 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Bundle\AdminBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
/**
18
 * @author Jan Góralski <[email protected]>
19
 */
20
final class Configuration implements ConfigurationInterface
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function getConfigTreeBuilder()
26
    {
27
        $treeBuilder = new TreeBuilder();
28
        $rootNode = $treeBuilder->root('sylius_admin');
29
30
        $rootNode
31
            ->children()
32
                ->arrayNode('notifications')
33
                    ->addDefaultsIfNotSet()
34
                    ->children()
35
                        ->booleanNode('enabled')
36
                            ->defaultTrue()
37
                        ->end()
38
                        ->integerNode('frequency')
39
                            ->defaultValue(60)
40
                        ->end()
41
                    ->end()
42
                ->end()
43
            ->end()
44
        ;
45
46
        return $treeBuilder;
47
    }
48
}
49