Chat::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Channels;
6
7
class Chat
8
{
9
    public const TYPE_PRIVATE = 'private';
10
    public const TYPE_GROUP = 'group';
11
12
    private $id;
13
    private $title;
14
    private $type;
15
16 31
    public function __construct(string $id, string $title = null, string $type = self::TYPE_PRIVATE)
17
    {
18 31
        $this->id = $id;
19 31
        $this->title = $title;
20 31
        $this->type = $type;
21 31
    }
22
23 3
    public function getId(): string
24
    {
25 3
        return $this->id;
26
    }
27
28 1
    public function getTitle(): ?string
29
    {
30 1
        return $this->title;
31
    }
32
33 1
    public function getType(): string
34
    {
35 1
        return $this->type;
36
    }
37
}
38