Completed
Push — master ( dfaaf8...fb517a )
by
unknown
04:08
created

getContainerExtension()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
crap 6
1
<?php
2
3
namespace MediaMonks\SonataMediaBundle;
4
5
use MediaMonks\SonataMediaBundle\DependencyInjection\MediaMonksSonataMediaExtension;
6
use Symfony\Component\HttpKernel\Bundle\Bundle;
7
8
/**
9
 * @author Robert Slootjes <[email protected]>
10
 */
11
class MediaMonksSonataMediaBundle extends Bundle
12
{
13
    const BUNDLE_CONFIG_NAME = 'mediamonks_sonata_media';
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function getContainerExtension()
19
    {
20
        if (null === $this->extension) {
21
            $this->extension = new MediaMonksSonataMediaExtension();
22
        }
23
24
        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 24 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...
25
    }
26
}
27