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

BankiruDoctrineApiBundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 8

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 8
dl 0
loc 17
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 9 1
A getContainerExtension() 0 4 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