Completed
Push — master ( 80edcc...1fe58d )
by
unknown
05:10 queued 11s
created

MediaMonksSonataMediaBundle.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\SonataMediaBundle;
4
5
use MediaMonks\SonataMediaBundle\DependencyInjection\Compiler\ProviderPass;
6
use MediaMonks\SonataMediaBundle\DependencyInjection\MediaMonksSonataMediaExtension;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\HttpKernel\Bundle\Bundle;
9
10
/**
11
 * @author Robert Slootjes <[email protected]>
12
 */
13
class MediaMonksSonataMediaBundle extends Bundle
14
{
15
    const BUNDLE_CONFIG_NAME = 'mediamonks_sonata_media';
16
17
    /**
18
     * @param ContainerBuilder $container
19
     */
20
    public function build(ContainerBuilder $container)
21
    {
22
        $container->addCompilerPass(new ProviderPass());
23
    }
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function getContainerExtension()
29
    {
30
        if (null === $this->extension) {
31
            $this->extension = new MediaMonksSonataMediaExtension();
32
        }
33
34
        return $this->extension;
0 ignored issues
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