GpsLabGeoIP2Bundle   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 12
ccs 4
cts 4
cp 1
rs 10
c 2
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 7 3
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * GpsLab component.
6
 *
7
 * @author    Peter Gribanov <[email protected]>
8
 * @copyright Copyright (c) 2017, Peter Gribanov
9
 * @license   http://opensource.org/licenses/MIT
10
 */
11
12
namespace GpsLab\Bundle\GeoIP2Bundle;
13
14
use GpsLab\Bundle\GeoIP2Bundle\DependencyInjection\GpsLabGeoIP2Extension;
15
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
16
use Symfony\Component\HttpKernel\Bundle\Bundle;
17
18
class GpsLabGeoIP2Bundle extends Bundle
19
{
20
    /**
21
     * @return ExtensionInterface|null
22
     */
23 1
    public function getContainerExtension(): ?ExtensionInterface
24
    {
25 1
        if (null === $this->extension) {
26 1
            $this->extension = new GpsLabGeoIP2Extension();
27
        }
28
29 1
        return $this->extension ?: null;
30
    }
31
}
32