Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 13
c 1
b 0
f 0
dl 0
loc 23
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 18 1
1
<?php
2
3
namespace AppBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * {@inheritdoc}
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function getConfigTreeBuilder()
17
    {
18
        // Initialize
19
        $treeBuilder = new TreeBuilder();
20
        $rootNode = $treeBuilder->root('afsy_chat');
21
22
        // Add AFSY Chat configuration
23
        $rootNode
24
            ->children()
25
                ->arrayNode('websocket')
26
                    ->children()
27
                        ->scalarNode('host')->end()
28
                        ->integerNode('port')->end()
29
                    ->end()
30
                ->end()
31
            ->end();
32
33
        return $treeBuilder;
34
    }
35
}
36