PayseraNormalizationBundle   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 29 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Paysera\Bundle\NormalizationBundle;
5
6
use Paysera\Component\DependencyInjection\AddTaggedCompilerPass;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\HttpKernel\Bundle\Bundle;
9
10
class PayseraNormalizationBundle extends Bundle
11
{
12 6
    public function build(ContainerBuilder $container)
13
    {
14
        // must be TypeAwareInterface, added with autoconfiguration, registered by implemented interfaces
15 6
        $container->addCompilerPass(new AddTaggedCompilerPass(
16 6
            'paysera_normalization.normalizer_registry_provider',
17 6
            'paysera_normalization.autoconfigured_normalizer',
18 6
            'addTypeAwareNormalizer',
19 6
            ['group' => null]
20
        ));
21
22 6
        $container->addCompilerPass(new AddTaggedCompilerPass(
23 6
            'paysera_normalization.normalizer_registry_provider',
24 6
            'paysera_normalization.normalizer',
25 6
            'addNormalizer',
26 6
            ['type' => null, 'group' => null]
27
        ));
28 6
        $container->addCompilerPass(new AddTaggedCompilerPass(
29 6
            'paysera_normalization.normalizer_registry_provider',
30 6
            'paysera_normalization.mixed_type_denormalizer',
31 6
            'addMixedTypeDenormalizer',
32 6
            ['type' => null, 'group' => null]
33
        ));
34 6
        $container->addCompilerPass(new AddTaggedCompilerPass(
35 6
            'paysera_normalization.normalizer_registry_provider',
36 6
            'paysera_normalization.object_denormalizer',
37 6
            'addObjectDenormalizer',
38 6
            ['type' => null, 'group' => null]
39
        ));
40 6
    }
41
}
42