SfCodSocketIoBundle::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\SocketIoBundle;
4
5
use SfCod\SocketIoBundle\DependencyInjection\Compiler\EventCompilerPass;
6
use SfCod\SocketIoBundle\DependencyInjection\SocketIoExtension;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\HttpKernel\Bundle\Bundle;
9
10
/**
11
 * Class SfCodSocketIoBundle.
12
 *
13
 * @author Virchenko Maksim <[email protected]>
14
 *
15
 * @package SfCod\SocketIoBundle
16
 */
17
class SfCodSocketIoBundle extends Bundle
18
{
19
    /**
20
     * Get bundle extension.
21
     *
22
     * @return SocketIoExtension|\Symfony\Component\DependencyInjection\Extension\ExtensionInterface|null
23
     */
24
    public function getContainerExtension()
25
    {
26
        return new SocketIoExtension();
27
    }
28
29
    /**
30
     * Add compiler pass.
31
     */
32
    public function build(ContainerBuilder $container)
33
    {
34
        parent::build($container);
35
36
        $container->addCompilerPass(new EventCompilerPass());
37
    }
38
}
39