CedricZielShariffBundle::getContainerExtension()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
3
namespace CedricZiel\ShariffBundle;
4
5
use CedricZiel\ShariffBundle\DependencyInjection\CedricZielShariffExtension;
6
use Symfony\Component\HttpKernel\Bundle\Bundle;
7
8
/**
9
 * @package CedricZiel\ShariffBundle
10
 */
11
class CedricZielShariffBundle extends Bundle
12
{
13
    /**
14
     * @return string
15
     */
16
    public function getContainerExtensionClass()
17
    {
18
        return CedricZielShariffExtension::class;
19
    }
20
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function getContainerExtension()
25
    {
26
        if (null === $this->extension) {
27
            return $this->extension = $this->createContainerExtension();
28
        }
29
30
        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 30 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...
31
    }
32
}
33