Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 20
ccs 15
cts 15
cp 1
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 2
    public function getConfigTreeBuilder()
20
    {
21 2
        $treeBuilder = new TreeBuilder();
22 2
        $rootNode = $treeBuilder->root('ghoubre_firebase_service');
23
        $rootNode
24 2
            ->children()
25 2
            ->scalarNode('serverKey')
26 2
            ->isRequired()
27 2
            ->cannotBeEmpty()
28 2
            ->end()
29 2
            ->scalarNode('content_available')
30 2
            ->defaultTrue()
31 2
            ->end()
32 2
            ->scalarNode('time_to_live')
33 2
            ->defaultValue(30)
34 2
            ->end()
35
        ;
36 2
        return $treeBuilder;
37
    }
38
}
39