Completed
Push — master ( 59049f...fab486 )
by Tomasz
12:46 queued 02:08
created

GendoriaCommandQueueRabbitMqDriverBundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 8 2
1
<?php
2
3
namespace Gendoria\CommandQueueRabbitMqDriverBundle;
4
5
use Gendoria\CommandQueueRabbitMqDriverBundle\DependencyInjection\GendoriaCommandQueueRabbitMqDriverExtension;
6
use Symfony\Component\HttpKernel\Bundle\Bundle;
7
8
/**
9
 * RabbitMQ integration bundle for Gendoria Command Queue.
10
 */
11
class GendoriaCommandQueueRabbitMqDriverBundle extends Bundle
12
{
13
    /**
14
     * Get bundle extension instance.
15
     *
16
     * @return GendoriaCommandQueueRabbitMqDriverExtension
17
     */
18
    public function getContainerExtension()
19
    {
20
        if (null === $this->extension) {
21
            $this->extension = new GendoriaCommandQueueRabbitMqDriverExtension();
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