ApplePassbookBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 8 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\ApplePassbookBundle;
6
7
use LauLamanApps\ApplePassbookBundle\DependencyInjection\ApplePassbookExtension;
8
use Symfony\Component\HttpKernel\Bundle\Bundle;
9
10
final class ApplePassbookBundle extends Bundle
11
{
12 2
    public function getContainerExtension()
13
    {
14 2
        if (null === $this->extension) {
15 2
            $this->extension = new ApplePassbookExtension();
16
        }
17
18 2
        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 18 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...
19
    }
20
}
21