Test Failed
Pull Request — master (#3)
by
unknown
10:08
created

PayseraNormalizationBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 29

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 29
ccs 0
cts 22
cp 0
rs 9.456
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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
    public function build(ContainerBuilder $container)
13
    {
14
        // must be TypeAwareInterface, added with autoconfiguration, registered by implemented interfaces
15
        $container->addCompilerPass(new AddTaggedCompilerPass(
16
            'paysera_normalization.normalizer_registry_provider',
17
            'paysera_normalization.autoconfigured_normalizer',
18
            'addTypeAwareNormalizer',
19
            ['group' => null]
20
        ));
21
22
        $container->addCompilerPass(new AddTaggedCompilerPass(
23
            'paysera_normalization.normalizer_registry_provider',
24
            'paysera_normalization.normalizer',
25
            'addNormalizer',
26
            ['type' => null, 'group' => null]
27
        ));
28
        $container->addCompilerPass(new AddTaggedCompilerPass(
29
            'paysera_normalization.normalizer_registry_provider',
30
            'paysera_normalization.mixed_type_denormalizer',
31
            'addMixedTypeDenormalizer',
32
            ['type' => null, 'group' => null]
33
        ));
34
        $container->addCompilerPass(new AddTaggedCompilerPass(
35
            'paysera_normalization.normalizer_registry_provider',
36
            'paysera_normalization.object_denormalizer',
37
            'addObjectDenormalizer',
38
            ['type' => null, 'group' => null]
39
        ));
40
    }
41
}
42