Test Failed
Push — draft ( f72ceb...541bbe )
by Nikolay
02:22
created

UploadStickerFileMethod::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Greenplugin\TelegramBot\Method;
6
7
use Greenplugin\TelegramBot\Type\InputFileType;
8
9
/**
10
 * Class UploadStickerFileMethod.
11
 *
12
 * Use this method to upload a .png file with a sticker for later use in createNewStickerSet
13
 * and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
14
 *
15
 * @see https://core.telegram.org/bots/api#uploadstickerfile
16
 */
17
class UploadStickerFileMethod
18
{
19
    /**
20
     * User identifier of sticker file owner.
21
     *
22
     * @var int
23
     */
24
    public $userId;
25
26
    /**
27
     * Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px,
28
     * and either width or height must be exactly 512px.
29
     *
30
     * @var InputFileType
31
     */
32
    public $pngSticker;
33
34
    /**
35
     * UploadStickerFileMethod constructor.
36
     *
37
     * @param int           $userId
38
     * @param InputFileType $pngSticker
39
     */
40
    public function __construct(int $userId, InputFileType $pngSticker)
41
    {
42
        $this->userId = $userId;
43
        $this->pngSticker = $pngSticker;
44
    }
45
}
46