Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 96.43%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 29
dl 0
loc 34
ccs 27
cts 28
cp 0.9643
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 32 1
1
<?php
2
3
namespace Incenteev\TranslationCheckerBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * @internal
10 8
 */
11
class Configuration implements ConfigurationInterface
12 8
{
13
    public function getConfigTreeBuilder(): TreeBuilder
14 8
    {
15 8
        $treeBuilder = new TreeBuilder('incenteev_translation_checker');
16
        $rootNode = $treeBuilder->getRootNode();
17
18
        $rootNode
19
            ->children()
20
                ->arrayNode('extraction')
21 8
                    ->addDefaultsIfNotSet()
22 8
                    ->fixXmlConfig('bundle')
23 8
                    ->children()
24 8
                        ->arrayNode('bundles')
25 8
                            ->prototype('scalar')->end()
26 8
                        ->end()
27 8
                        ->arrayNode('js')
28 8
                            ->addDefaultsIfNotSet()
29 8
                            ->fixXmlConfig('path')
30 8
                            ->children()
31 8
                                ->scalarNode('default_domain')
32 8
                                    ->info('The default domain used for JS translation (should match the JsTranslationBundle config)')
33 8
                                    ->defaultValue('messages')
34 8
                                ->end()
35 8
                                ->arrayNode('paths')
36 8
                                    ->prototype('scalar')->end()
37 8
                                ->end()
38 8
                            ->end()
39 8
                        ->end()
40 8
                    ->end()
41 8
                ->end()
42 8
            ->end();
43 8
44 8
        return $treeBuilder;
45
    }
46
}
47