Test Setup Failed
Branch master (e0eff2)
by Alexey
06:56
created

AbstractKernelBootstrap::container()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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
}