OptionsExtension   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 38
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 3 1
A load() 0 3 1
A configure() 0 10 1
A getName() 0 4 1
1
<?php
2
3
namespace Openl10n\Cli\ServiceContainer\Extension;
4
5
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8
class OptionsExtension implements ConfiguredExtension
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function initialize(ContainerBuilder $container)
14
    {
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function load(array $config, ContainerBuilder $container)
21
    {
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function configure(ArrayNodeDefinition $node)
28
    {
29
        $node
30
            ->beforeNormalization()
31
                ->ifNull()
32
                ->thenEmptyArray()
33
            ->end()
34
            ->prototype('scalar')->end()
35
        ;
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    public function getName()
42
    {
43
        return 'options';
44
    }
45
}
46