Completed
Push — master ( 623160...c010a4 )
by Vladimir
10:58
created

Kernel::__construct()   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
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Foundation;
6
7
use FondBot\Channels\Channel;
8
9
class Kernel
10
{
11
    public const VERSION = '2.0';
12
13
    /** @var Channel|null */
14
    private $channel;
15
16
    /**
17
     * Initialize kernel.
18
     *
19
     * @param Channel $channel
20
     */
21
    public function initialize(Channel $channel): void
22
    {
23
        $this->channel = $channel;
24
    }
25
26
    /**
27
     * Get current channel.
28
     *
29
     * @return Channel|null
30
     */
31
    public function getChannel(): ?Channel
32
    {
33
        return $this->channel;
34
    }
35
}
36