KleijnWebRestETagBundle::getNamespace()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\RestETagBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace KleijnWeb\RestETagBundle;
10
11
use KleijnWeb\RestETagBundle\DependencyInjection\KleijnWebRestETagExtension;
12
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
13
use Symfony\Component\HttpKernel\Bundle\Bundle;
14
15
/**
16
 * @author John Kleijn <[email protected]>
17
 */
18
class KleijnWebRestETagBundle extends Bundle
19
{
20
    /**
21
     * @return string The Bundle namespace
22
     */
23
    public function getNamespace()
24
    {
25
        return __NAMESPACE__;
26
    }
27
28
    /**
29
     * @return ExtensionInterface
30
     */
31
    public function getContainerExtension()
32
    {
33
        if (null === $this->extension) {
34
            $this->extension = new KleijnWebRestETagExtension();
35
        }
36
37
        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 37 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...
38
    }
39
}
40