InnmindRestBundle::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 13
CRAP Score 1

Importance

Changes 5
Bugs 0 Features 4
Metric Value
c 5
b 0
f 4
dl 0
loc 19
ccs 13
cts 13
cp 1
rs 9.4286
cc 1
eloc 13
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Innmind\RestBundle;
4
5
use Innmind\RestBundle\DependencyInjection\Compiler\RegisterClientDecodersPass;
6
use Innmind\Rest\Server\DependencyInjection\Compiler\RegisterFormatPass;
7
use Innmind\Rest\Server\DependencyInjection\Compiler\RegisterStoragePass;
8
use Innmind\Rest\Server\DependencyInjection\Compiler\RegisterDefinitionCompilerPass;
9
use Symfony\Component\HttpKernel\Bundle\Bundle;
10
use Symfony\Component\DependencyInjection\ContainerBuilder;
11
12
class InnmindRestBundle extends Bundle
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17 2
    public function build(ContainerBuilder $container)
18
    {
19 2
        parent::build($container);
20
21
        $container
22 2
            ->addCompilerPass(new RegisterClientDecodersPass)
23 2
            ->addCompilerPass(new RegisterFormatPass(
24 2
                'innmind_rest.server.formats',
25
                'innmind_rest.server.format'
26 2
            ))
27 2
            ->addCompilerPass(new RegisterStoragePass(
28 2
                'innmind_rest.server.storages',
29
                'innmind_rest.server.storage'
30 2
            ))
31 2
            ->addCompilerPass(new RegisterDefinitionCompilerPass(
32 2
                'innmind_rest.server.definition_compiler',
33
                'innmind_rest.server.definition_pass'
34 2
            ));
35 2
    }
36
}
37