KleijnWebRestETagBundle   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getNamespace() 0 4 1
A getContainerExtension() 0 8 2
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