Passed
Branch master (bdaefa)
by Gary
08:54
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 20
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 18 1
1
<?php
2
3
/*
4
 * This file is part of the Firebase Service Bundle.
5
 *
6
 * (c) Gary HOUBRE <[email protected]>
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 Ghoubre\FirebaseServiceBundle\DependencyInjection;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
use Symfony\Component\Config\Definition\ConfigurationInterface;
16
17
class Configuration implements ConfigurationInterface
18
{
19
    public function getConfigTreeBuilder()
20
    {
21
        $treeBuilder = new TreeBuilder();
22
        $rootNode = $treeBuilder->root('ghoubre_firebase_service');
23
        $rootNode
24
            ->children()
25
            ->scalarNode('serverKey')
26
            ->isRequired()
27
            ->cannotBeEmpty()
28
            ->end()
29
            ->scalarNode('content_available')
30
            ->defaultTrue()
31
            ->end()
32
            ->scalarNode('time_to_live')
33
            ->defaultValue(30)
34
            ->end()
35
        ;
36
        return $treeBuilder;
37
    }
38
}
39