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

getContainerExtension()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
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