Completed
Push — master ( 8bd433...437729 )
by
unknown
08:18
created

MediaMonksCrawlerBundle::getContainerExtension()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
crap 2
1
<?php
2
3
namespace MediaMonks\CrawlerBundle;
4
5
use MediaMonks\CrawlerBundle\DependencyInjection\Compiler\UrlMatcherPass;
6
use MediaMonks\CrawlerBundle\DependencyInjection\Compiler\UrlNormalizerPass;
7
use MediaMonks\CrawlerBundle\DependencyInjection\MediaMonksCrawlerExtension;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\HttpKernel\Bundle\Bundle;
10
11
/**
12
 * @author Robert Slootjes <[email protected]>
13
 */
14
class MediaMonksCrawlerBundle extends Bundle
15
{
16
    /**
17
     * @param ContainerBuilder $container
18
     */
19
    public function build(ContainerBuilder $container)
20
    {
21
        $container->addCompilerPass(new UrlMatcherPass());
22
        $container->addCompilerPass(new UrlNormalizerPass());
23
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28 1
    public function getContainerExtension()
29
    {
30 1
        if (null === $this->extension) {
31 1
            $this->extension = new MediaMonksCrawlerExtension();
32 1
        }
33
34 1
        return $this->extension;
35
    }
36
}
37