EventBusBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 5
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 4 1
A build() 0 7 1
1
<?php
2
3
namespace Bruli\EventBusBundle;
4
5
use Bruli\EventBusBundle\CommandBus\CommandBusCompilerPass;
6
use Bruli\EventBusBundle\DependencyInjection\EventBusExtension;
7
use Bruli\EventBusBundle\QueryBus\QueryBusCompilerPass;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\HttpKernel\Bundle\Bundle;
10
11
class EventBusBundle extends Bundle
12
{
13
    /**
14
     * @return EventBusExtension
15
     */
16
    public function getContainerExtension()
17
    {
18
        return new EventBusExtension();
19
    }
20
21
    /**
22
     * @param ContainerBuilder $container
23
     */
24
    public function build(ContainerBuilder $container)
25
    {
26
        parent::build($container);
27
28
        $container->addCompilerPass(new CommandBusCompilerPass());
29
        $container->addCompilerPass(new QueryBusCompilerPass());
30
    }
31
}
32