Completed
Push — master ( e066e7...3a43eb )
by
unknown
04:49
created

MediaMonksCrawlerBundle.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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 1
    public function build(ContainerBuilder $container)
20
    {
21 1
        $container->addCompilerPass(new UrlMatcherPass());
22 1
        $container->addCompilerPass(new UrlNormalizerPass());
23 1
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28 2
    public function getContainerExtension()
29
    {
30 2
        if (null === $this->extension) {
31 2
            $this->extension = new MediaMonksCrawlerExtension();
32 2
        }
33
34 2
        return $this->extension;
1 ignored issue
show
Comprehensibility Best Practice introduced by
The expression $this->extension; of type Symfony\Component\Depend...xtensionInterface|false adds false to the return on line 34 which is incompatible with the return type declared by the interface Symfony\Component\HttpKe...::getContainerExtension of type Symfony\Component\Depend...ExtensionInterface|null. It seems like you forgot to handle an error condition.
Loading history...
35
    }
36
}
37