Completed
Pull Request — master (#4)
by Pavel
10:02
created

BankiruDoctrineApiBundle::getContainerExtension()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Bankiru\Api;
4
5
use Bankiru\Api\DependencyInjection\BankiruDoctrineApiExtension;
6
use Bankiru\Api\DependencyInjection\Compiler\ApiFactoryPass;
7
use Bankiru\Api\DependencyInjection\Compiler\ClientCollectorPass;
8
use Bankiru\Api\DependencyInjection\Compiler\LoggerDecoratorPass;
9
use Bankiru\Api\DependencyInjection\Compiler\MappingCollectorPass;
10
use Bankiru\Api\DependencyInjection\Compiler\ProfilerDecoratorPass;
11
use Symfony\Component\DependencyInjection\ContainerBuilder;
12
use Symfony\Component\HttpKernel\Bundle\Bundle;
13
14
class BankiruDoctrineApiBundle extends Bundle
15
{
16 5
    public function build(ContainerBuilder $container)
17
    {
18 5
        parent::build($container);
19 5
        $container->addCompilerPass(new ClientCollectorPass());
20 5
        $container->addCompilerPass(new MappingCollectorPass());
21 5
        $container->addCompilerPass(new LoggerDecoratorPass());
22 5
        $container->addCompilerPass(new ProfilerDecoratorPass());
23 5
        $container->addCompilerPass(new ApiFactoryPass());
24 5
    }
25
26 5
    public function getContainerExtension()
27
    {
28 5
        return new BankiruDoctrineApiExtension();
29
    }
30
}
31