Sticker   A
last analyzed

Complexity

Total Complexity 20

Size/Duplication

Total Lines 232
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 31
dl 0
loc 232
rs 10
c 1
b 0
f 0
wmc 20

20 Methods

Rating   Name   Duplication   Size   Complexity  
A getFileUniqueId() 0 3 1
A isAnimated() 0 3 1
A getHeight() 0 3 1
A getSetName() 0 3 1
A setFileSize() 0 3 1
A setWidth() 0 3 1
A getWidth() 0 3 1
A getThumb() 0 3 1
A setHeight() 0 3 1
A getFileId() 0 3 1
A setEmoji() 0 3 1
A setThumb() 0 3 1
A setFileId() 0 3 1
A getEmoji() 0 3 1
A setFileUniqueId() 0 3 1
A setIsAnimated() 0 3 1
A setMaskPosition() 0 3 1
A setSetName() 0 3 1
A getMaskPosition() 0 3 1
A getFileSize() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\File;
6
7
/**
8
 * This object represents a sticker.
9
 *
10
 * More on https://core.telegram.org/bots/api#sticker
11
 */
12
class Sticker
13
{
14
15
    /**
16
     * Identifier for this file, which can be used to download or reuse the file
17
     *
18
     * @var string
19
     */
20
    private $file_id;
21
22
    /**
23
     * Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to
24
     * download or reuse the file.
25
     *
26
     * @var string
27
     */
28
    private $file_unique_id;
29
30
    /**
31
     * Sticker width
32
     *
33
     * @var int
34
     */
35
    private $width;
36
37
    /**
38
     * Sticker height
39
     *
40
     * @var int
41
     */
42
    private $height;
43
44
    /**
45
     * True, if the sticker is animated
46
     *
47
     * @var bool
48
     */
49
    private $is_animated;
50
51
    /**
52
     * Optional. Sticker thumbnail in the .WEBP or .JPG format
53
     *
54
     * @var PhotoSize|null
55
     */
56
    private $thumb;
57
58
    /**
59
     * Optional. Emoji associated with the sticker
60
     *
61
     * @var string|null
62
     */
63
    private $emoji;
64
65
    /**
66
     * Optional. Name of the sticker set to which the sticker belongs
67
     *
68
     * @var string|null
69
     */
70
    private $set_name;
71
72
    /**
73
     * Optional. For mask stickers, the position where the mask should be placed
74
     *
75
     * @var MaskPosition|null
76
     */
77
    private $mask_position;
78
79
    /**
80
     * Optional. File size
81
     *
82
     * @var int|null
83
     */
84
    private $file_size;
85
86
    /**
87
     * @return string
88
     */
89
    public function getFileId(): string
90
    {
91
        return $this->file_id;
92
    }
93
94
    /**
95
     * @param string $file_id
96
     */
97
    public function setFileId(string $file_id): void
98
    {
99
        $this->file_id = $file_id;
100
    }
101
102
    /**
103
     * @return string
104
     */
105
    public function getFileUniqueId(): string
106
    {
107
        return $this->file_unique_id;
108
    }
109
110
    /**
111
     * @param string $file_unique_id
112
     */
113
    public function setFileUniqueId(string $file_unique_id): void
114
    {
115
        $this->file_unique_id = $file_unique_id;
116
    }
117
118
    /**
119
     * @return int
120
     */
121
    public function getWidth(): int
122
    {
123
        return $this->width;
124
    }
125
126
    /**
127
     * @param int $width
128
     */
129
    public function setWidth(int $width): void
130
    {
131
        $this->width = $width;
132
    }
133
134
    /**
135
     * @return int
136
     */
137
    public function getHeight(): int
138
    {
139
        return $this->height;
140
    }
141
142
    /**
143
     * @param int $height
144
     */
145
    public function setHeight(int $height): void
146
    {
147
        $this->height = $height;
148
    }
149
150
    /**
151
     * @return bool
152
     */
153
    public function isAnimated(): bool
154
    {
155
        return $this->is_animated;
156
    }
157
158
    /**
159
     * @param bool $is_animated
160
     */
161
    public function setIsAnimated(bool $is_animated): void
162
    {
163
        $this->is_animated = $is_animated;
164
    }
165
166
    /**
167
     * @return PhotoSize|null
168
     */
169
    public function getThumb(): ?PhotoSize
170
    {
171
        return $this->thumb;
172
    }
173
174
    /**
175
     * @param PhotoSize|null $thumb
176
     */
177
    public function setThumb(?PhotoSize $thumb): void
178
    {
179
        $this->thumb = $thumb;
180
    }
181
182
    /**
183
     * @return string|null
184
     */
185
    public function getEmoji(): ?string
186
    {
187
        return $this->emoji;
188
    }
189
190
    /**
191
     * @param string|null $emoji
192
     */
193
    public function setEmoji(?string $emoji): void
194
    {
195
        $this->emoji = $emoji;
196
    }
197
198
    /**
199
     * @return string|null
200
     */
201
    public function getSetName(): ?string
202
    {
203
        return $this->set_name;
204
    }
205
206
    /**
207
     * @param string|null $set_name
208
     */
209
    public function setSetName(?string $set_name): void
210
    {
211
        $this->set_name = $set_name;
212
    }
213
214
    /**
215
     * @return MaskPosition|null
216
     */
217
    public function getMaskPosition(): ?MaskPosition
218
    {
219
        return $this->mask_position;
220
    }
221
222
    /**
223
     * @param MaskPosition|null $mask_position
224
     */
225
    public function setMaskPosition(?MaskPosition $mask_position): void
226
    {
227
        $this->mask_position = $mask_position;
228
    }
229
230
    /**
231
     * @return int|null
232
     */
233
    public function getFileSize(): ?int
234
    {
235
        return $this->file_size;
236
    }
237
238
    /**
239
     * @param int|null $file_size
240
     */
241
    public function setFileSize(?int $file_size): void
242
    {
243
        $this->file_size = $file_size;
244
    }
245
246
}