Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 22 1
1
<?php
2
3
namespace Chrl\AppBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the class that validates and merges configuration from your app/config files
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function getConfigTreeBuilder()
18
    {
19
        $treeBuilder = new TreeBuilder();
20
        $rootNode = $treeBuilder->root('buktopuha');
21
22
23
        $rootNode
24
                ->children()
25
                    ->scalarNode("token")->isRequired()->end()
26
                    ->scalarNode("bot_name")->end()
27
                    ->arrayNode("webhook")
28
                    ->children()
29
                        ->scalarNode("domain")->end()
30
                        ->scalarNode("path_prefix")->end()
31
                        ->scalarNode("update_receiver")->defaultValue("app.update_receiver")->end()
32
                    ->end()
33
                    ->end()
34
                ->end();
35
36
37
        return $treeBuilder;
38
    }
39
}
40