SfCodQueueBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 24
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 4 1
A build() 0 6 1
1
<?php
2
3
namespace SfCod\QueueBundle;
4
5
use SfCod\QueueBundle\DependencyInjection\Compiler\JobCompilerPass;
6
use SfCod\QueueBundle\DependencyInjection\QueueExtension;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\HttpKernel\Bundle\Bundle;
9
10
/**
11
 * Class CommonQueueBundle
12
 *
13
 * @author Virchenko Maksim <[email protected]>
14
 *
15
 * @package SfCod\QueueBundle
16
 */
17
class SfCodQueueBundle extends Bundle
18
{
19
    /**
20
     * Get bundle extension
21
     *
22
     * @return QueueExtension|\Symfony\Component\DependencyInjection\Extension\ExtensionInterface|null
23
     */
24
    public function getContainerExtension()
25
    {
26
        return new QueueExtension();
27
    }
28
29
    /**
30
     * Add compiler pass
31
     *
32
     * @param ContainerBuilder $container
33
     */
34
    public function build(ContainerBuilder $container)
35
    {
36
        parent::build($container);
37
38
        $container->addCompilerPass(new JobCompilerPass());
39
    }
40
}
41