Completed
Pull Request — master (#1)
by Sascha-Oliver
13:26
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 16 1
1
<?php
2
3
namespace Translation\PlatformAdapter\PhraseApp\Bridge\Symfony\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function getConfigTreeBuilder()
14
    {
15
        $treeBuilder = new TreeBuilder();
16
        $root = $treeBuilder->root('translation_adapter_phrase_app');
17
18
        $root->children()
19
            ->scalarNode('httplug_client')->defaultValue('httplug.client')->cannotBeEmpty()->end()
20
            ->scalarNode('httplug_message_factory')->defaultValue('httplug.message_factory')->cannotBeEmpty()->end()
21
            ->scalarNode('httplug_uri_factory')->defaultValue('httplug.uri_factory')->cannotBeEmpty()->end()
22
            ->scalarNode('project_id')->cannotBeEmpty()->end()
23
            ->scalarNode('token')->cannotBeEmpty()->end()
24
            ->arrayNode('locale_to_id_mapping')->prototype('scalar')->end()->end()
25
        ->end();
26
27
        return $treeBuilder;
28
    }
29
}
30