Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 18
ccs 14
cts 14
cp 1
rs 9.4285
cc 1
eloc 14
nc 1
nop 0
crap 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 1
    public function getConfigTreeBuilder()
17
    {
18 1
        $treeBuilder = new TreeBuilder();
19 1
        $root = $treeBuilder->root('translation_adapter_phrase_app');
20
21 1
        $root->children()
22 1
            ->scalarNode('httplug_client')->defaultValue('httplug.client')->cannotBeEmpty()->end()
23 1
            ->scalarNode('httplug_message_factory')->defaultValue('httplug.message_factory')->cannotBeEmpty()->end()
24 1
            ->scalarNode('httplug_uri_factory')->defaultValue('httplug.uri_factory')->cannotBeEmpty()->end()
25 1
            ->scalarNode('project_id')->cannotBeEmpty()->end()
26 1
            ->scalarNode('token')->cannotBeEmpty()->end()
27 1
            ->scalarNode('default_locale')->end()
28 1
            ->arrayNode('locale_to_id_mapping')->prototype('scalar')->end()->end()
29 1
            ->arrayNode('domains')->prototype('scalar')->end()->end()
30 1
        ->end();
31
32 1
        return $treeBuilder;
33
    }
34
}
35