ForumTopic   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 115
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
eloc 19
c 1
b 0
f 0
dl 0
loc 115
ccs 0
cts 32
cp 0
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getMessageThreadId() 0 3 1
A getName() 0 3 1
A setName() 0 3 1
A setMessageThreadId() 0 3 1
A setIconColor() 0 3 1
A setIconCustomEmojiId() 0 3 1
A getIconColor() 0 3 1
A getIconCustomEmojiId() 0 3 1
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\TypeInterface;
7
8
/**
9
 * Class ForumTopic
10
 * This object represents a forum topic.
11
 *
12
 * @package TelegramBot\Api\Types
13
 * @author bernard-ng <[email protected]>
14
 */
15
class ForumTopic extends BaseType implements TypeInterface
16
{
17
    /**
18
     * {@inheritdoc}
19
     *
20
     * @var array
21
     */
22
    protected static $requiredParams = ['message_thread_id', 'name', 'icon_color'];
23
24
    /**
25
     * {@inheritdoc}
26
     *
27
     * @var array
28
     */
29
    protected static $map = [
30
        'message_thread_id' => true,
31
        'name' => true,
32
        'icon_color' => true,
33
        'icon_custom_emoji_id' => true,
34
    ];
35
36
    /**
37
     * Unique identifier of the forum topic
38
     *
39
     * @var int
40
     */
41
    protected $messageThreadId;
42
43
    /**
44
     * Name of the topic
45
     *
46
     * @var string
47
     */
48
    protected $name;
49
50
    /**
51
     * Color of the topic icon in RGB format
52
     *
53
     * @var int
54
     */
55
    protected $iconColor;
56
57
    /**
58
     * Optional. Unique identifier of the custom emoji shown as the topic icon
59
     *
60
     * @var string|null
61
     */
62
    protected $iconCustomEmojiId;
63
64
    /**
65
     * @return int
66
     */
67
    public function getMessageThreadId()
68
    {
69
        return $this->messageThreadId;
70
    }
71
72
    /**
73
     * @param int $messageThreadId
74
     * @return void
75
     */
76
    public function setMessageThreadId($messageThreadId)
77
    {
78
        $this->messageThreadId = $messageThreadId;
79
    }
80
81
    /**
82
     * @return string
83
     */
84
    public function getName()
85
    {
86
        return $this->name;
87
    }
88
89
    /**
90
     * @param string $name
91
     * @return void
92
     */
93
    public function setName($name)
94
    {
95
        $this->name = $name;
96
    }
97
98
    /**
99
     * @return int
100
     */
101
    public function getIconColor()
102
    {
103
        return $this->iconColor;
104
    }
105
106
    /**
107
     * @param int $iconColor
108
     * @return void
109
     */
110
    public function setIconColor($iconColor)
111
    {
112
        $this->iconColor = $iconColor;
113
    }
114
115
    /**
116
     * @return null|string
117
     */
118
    public function getIconCustomEmojiId()
119
    {
120
        return $this->iconCustomEmojiId;
121
    }
122
123
    /**
124
     * @param string $iconCustomEmojiId
125
     * @return void
126
     */
127
    public function setIconCustomEmojiId($iconCustomEmojiId)
128
    {
129
        $this->iconCustomEmojiId = $iconCustomEmojiId;
130
    }
131
}
132