CedricZielShariffBundle   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

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