Completed
Push — master ( ebdf7a...2dba39 )
by Vladimir
05:12
created

Chat   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 3 1
A __construct() 0 5 1
A getId() 0 3 1
A getTitle() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot;
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
    public function __construct(string $id, string $title = null, string $type = self::TYPE_PRIVATE)
17
    {
18
        $this->id = $id;
19
        $this->title = $title;
20
        $this->type = $type;
21
    }
22
23
    public function getId(): string
24
    {
25
        return $this->id;
26
    }
27
28
    public function getTitle(): ?string
29
    {
30
        return $this->title;
31
    }
32
33
    public function getType(): string
34
    {
35
        return $this->type;
36
    }
37
}
38