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

Kernel   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 27
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 4 1
A getChannel() 0 4 1
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