QuerySortingBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Bugloos\QuerySortingBundle;
6
7
use Bugloos\QuerySortingBundle\DependencyInjection\QuerySortingExtension;
8
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
9
use Symfony\Component\HttpKernel\Bundle\Bundle;
10
11
/**
12
 * @author Milad Ghofrani <[email protected]>
13
 */
14
class QuerySortingBundle extends Bundle
15
{
16
    /**
17
     * @return ExtensionInterface|QuerySortingExtension
18
     *
19
     * @author Milad Ghofrani <[email protected]>
20
     */
21
    public function getContainerExtension(): ?ExtensionInterface
22
    {
23
        if (null === $this->extension) {
24
            $this->extension = new QuerySortingExtension();
25
        }
26
27
        return $this->extension;
28
    }
29
}
30