Completed
Pull Request — master (#1)
by Sascha-Oliver
06:50
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 22
ccs 0
cts 14
cp 0
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
/**
9
 * @author Sascha-Oliver Prolic <[email protected]>
10
 */
11
class Configuration implements ConfigurationInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function getConfigTreeBuilder()
17
    {
18
        $treeBuilder = new TreeBuilder();
19
        $root = $treeBuilder->root('translation_adapter_phrase_app');
20
21
        $root->children()
22
            ->scalarNode('httplug_client')->defaultValue('httplug.client')->cannotBeEmpty()->end()
23
            ->scalarNode('httplug_message_factory')->defaultValue('httplug.message_factory')->cannotBeEmpty()->end()
24
            ->scalarNode('httplug_uri_factory')->defaultValue('httplug.uri_factory')->cannotBeEmpty()->end()
25
            ->scalarNode('project_id')->cannotBeEmpty()->end()
26
            ->scalarNode('token')->cannotBeEmpty()->end()
27
            ->arrayNode('locale_to_id_mapping')->prototype('scalar')->end()->end()
28
        ->end();
29
30
        return $treeBuilder;
31
    }
32
}
33