Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 30
ccs 19
cts 19
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 24 1
1
<?php
2
3
namespace Happyr\Mq2phpBundle\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
     * {@inheritdoc}
15
     */
16 2
    public function getConfigTreeBuilder()
17
    {
18 2
        $treeBuilder = new TreeBuilder();
19 2
        $root = $treeBuilder->root('happyr_mq2php');
20
21
        $root
22 2
            ->children()
23 2
                ->booleanNode('enabled')->defaultTrue()->end()
24 2
                ->scalarNode('command_queue')->defaultValue('asynchronous_commands')->end()
25 2
                ->scalarNode('event_queue')->defaultValue('asynchronous_events')->end()
26 2
                ->scalarNode('secret_key')->defaultNull()->info('The secret key is used to verify that the message is valid.')->end()
27 2
                ->arrayNode('message_headers')->addDefaultsIfNotSet()
28 2
                    ->children()
29 2
                        ->scalarNode('http_url')->defaultNull()->end()
30 2
                        ->scalarNode('php_bin')->defaultNull()->end()
31 2
                        ->scalarNode('dispatch_path')->defaultNull()->end()
32 2
                        ->scalarNode('fastcgi_host')->cannotBeEmpty()->defaultValue('localhost')->end()
33 2
                        ->scalarNode('fastcgi_port')->defaultValue(9000)->end()
34 2
                    ->end()
35 2
                    ->end()
36 2
            ->end();
37
38 2
        return $treeBuilder;
39
    }
40
}
41