Kernel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getContainer() 0 9 2
1
<?php
2
3
namespace Preetender\Routing;
4
5
use League\Container\Container;
6
7
/**
8
 * Class Kernel
9
 * @package Preetender\Routing
10
 */
11
final class Kernel
12
{
13
    /** @var  Container */
14
    private static $instance;
15
16
    /**
17
     * Get container service
18
     *
19
     * @return Container
20
     */
21
    public static function getContainer(): Container
22
    {
23
        if( null === self::$instance) {
24
            $container = new Container();
25
            $container->addServiceProvider(new RouteServiceProvider());
26
            self::$instance = $container;
27
        }
28
        return self::$instance;
29
    }
30
}