Passed
Pull Request — master (#408)
by Alexander
01:43
created

StickerSet::getThumb()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\TypeInterface;
7
8
/**
9
 * Class StickerSet
10
 * This object represents a sticker set.
11
 *
12
 * @package TelegramBot\Api\Types
13
 * @author bernard-ng <[email protected]>
14
 */
15
class StickerSet extends BaseType implements TypeInterface
16
{
17
    /**
18
     * {@inheritdoc}
19
     *
20
     * @var array
21
     */
22
    protected static $requiredParams = ['name', 'title', 'sticker_type', 'is_animated', 'is_video', 'stickers'];
23
24
    /**
25
     * {@inheritdoc}
26
     *
27
     * @var array
28
     */
29
    protected static $map = [
30
        'name' => true,
31
        'title' => true,
32
        'sticker_type' => true,
33
        'is_animated' => true,
34
        'is_video' => true,
35
        'stickers' => true,
36
        'thumb' => true,
37
    ];
38
39
    /**
40
     * Sticker set name
41
     *
42
     * @var string
43
     */
44
    protected $name;
45
46
    /**
47
     * Sticker set title
48
     *
49
     * @var string
50
     */
51
    protected $title;
52
53
    /**
54
     * Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji”
55
     *
56
     * @var string
57
     */
58
    protected $stickerType;
59
60
    /**
61
     * True, if the sticker set contains animated stickers
62
     *
63
     * @var bool
64
     */
65
    protected $isAnimated;
66
67
    /**
68
     * True, if the sticker set contains video stickers
69
     *
70
     * @var bool
71
     */
72
    protected $isVideo;
73
74
    /**
75
     * List of all set stickers
76
     *
77
     * @var ArrayOfSticker
78
     */
79
    protected $stickers;
80
81
    /**
82
     * Optional. Sticker set thumbnail in the .WEBP or .TGS format
83
     *
84
     * @var PhotoSize
85
     */
86
    protected $thumb;
87
88
    /**
89
     * @return string
90
     */
91
    public function getName()
92
    {
93
        return $this->name;
94
    }
95
96
    /**
97
     * @param string $name
98
     */
99
    public function setName($name)
100
    {
101
        $this->name = $name;
102
    }
103
104
    /**
105
     * @return string
106
     */
107
    public function getTitle()
108
    {
109
        return $this->title;
110
    }
111
112
    /**
113
     * @param string $title
114
     */
115
    public function setTitle($title)
116
    {
117
        $this->title = $title;
118
    }
119
120
    /**
121
     * @return string
122
     */
123
    public function getStickerType()
124
    {
125
        return $this->stickerType;
126
    }
127
128
    /**
129
     * @param string $stickerType
130
     */
131
    public function setStickerType($stickerType)
132
    {
133
        $this->stickerType = $stickerType;
134
    }
135
136
    /**
137
     * @return bool
138
     */
139
    public function getIsAnimated()
140
    {
141
        return $this->isAnimated;
142
    }
143
144
    /**
145
     * @param bool $isAnimated
146
     */
147
    public function setIsAnimated($isAnimated)
148
    {
149
        $this->isAnimated = $isAnimated;
150
    }
151
152
    /**
153
     * @return bool
154
     */
155
    public function getIsVideo()
156
    {
157
        return $this->isVideo;
158
    }
159
160
    /**
161
     * @param bool $isVideo
162
     */
163
    public function setIsVideo($isVideo)
164
    {
165
        $this->isVideo = $isVideo;
166
    }
167
168
    /**
169
     * @return ArrayOfSticker
170
     */
171
    public function getStickers()
172
    {
173
        return $this->stickers;
174
    }
175
176
    /**
177
     * @param ArrayOfSticker $stickers
178
     */
179
    public function setStickers($stickers)
180
    {
181
        $this->stickers = $stickers;
182
    }
183
184
    /**
185
     * @return PhotoSize
186
     */
187
    public function getThumb()
188
    {
189
        return $this->thumb;
190
    }
191
192
    /**
193
     * @param PhotoSize $thumb
194
     */
195
    public function setThumb($thumb)
196
    {
197
        $this->thumb = $thumb;
198
    }
199
}
200