Passed
Branch master (e0eff2)
by Alexey
03:20
created

AbstractKernelBootstrap   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 47
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
__invoke() 0 1 ?
A container() 0 4 1
A kernel() 0 4 1
1
<?php declare(strict_types = 1);
2
3
namespace Venta\Framework\Kernel;
4
5
use Venta\Contracts\Container\Container;
6
use Venta\Contracts\Kernel\Kernel;
7
8
/**
9
 * Class AbstractKernelBootstrap
10
 *
11
 * @package Venta\Framework\Kernel
12
 */
13
abstract class AbstractKernelBootstrap
14
{
15
    /**
16
     * @var Container
17
     */
18
    private $container;
19
20
    /**
21
     * @var Kernel
22
     */
23
    private $kernel;
24
25
    /**
26
     * AbstractKernelBootstrap constructor.
27
     *
28
     * @param Container $container
29
     * @param Kernel $kernel
30
     */
31
    public function __construct(Container $container, Kernel $kernel)
32
    {
33
        $this->container = $container;
34
        $this->kernel = $kernel;
35
    }
36
37
    /**
38
     * Runs the Bootstrap.
39
     *
40
     * @return void
41
     */
42
    abstract public function __invoke();
43
44
    /**
45
     * @return Container
46
     */
47
    protected function container(): Container
48
    {
49
        return $this->container;
50
    }
51
52
    /**
53
     * @return Kernel
54
     */
55
    protected function kernel(): Kernel
56
    {
57
        return $this->kernel;
58
    }
59
}