SfCodQueueBundle::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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