Application   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
eloc 13
dl 0
loc 50
ccs 0
cts 23
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A end() 0 3 1
A process() 0 4 1
A make() 0 6 2
A configure() 0 11 1
1
<?php
2
namespace DevOp\Core\Framework;
3
4
use DevOp\Core\Container;
5
use DevOp\Core\Framework\Controller;
6
7
class Application
8
{
9
10
    /**
11
     * @var Container
12
     */
13
    private $container;
14
15
    /**
16
     * @return $this
17
     */
18
    private static $instance;
19
20
    /**
21
     * @return $this
22
     */
23
    public static function make()
24
    {
25
        if (null === self::$instance) {
26
            self::$instance = new Application();
27
        }
28
        return self::$instance;
29
    }
30
31
    /**
32
     * 
33
     * @return $this
34
     */
35
    public function configure()
36
    {
37
        $this->container = new Container();
38
39
        $this->container->add('debug', env('APP_DEBUG'));
40
41
        $this->container->add(Controller::class, function() {
42
            return new Controller($this->container);
43
        });
44
45
        return $this;
46
    }
47
48
    public function process()
49
    {
50
51
        return $this;
52
    }
53
54
    public function end()
55
    {
56
        return $this;
57
    }
58
}
59