Completed
Push — master ( fb3dec...ea8134 )
by Camilo
12s
created

UploadStickerFile::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
ccs 0
cts 2
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace unreal4u\TelegramAPI\Telegram\Methods;
6
7
use unreal4u\TelegramAPI\Abstracts\TelegramMethods;
8
use unreal4u\TelegramAPI\Telegram\Types\Custom\InputFile;
9
10
/**
11
 * Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods
12
 * (can be used multiple times). Returns the uploaded File on success
13
 *
14
 * Objects defined as-is july 2017
15
 *
16
 * @see https://core.telegram.org/bots/api#uploadstickerfile
17
 */
18
class UploadStickerFile extends TelegramMethods
19
{
20
    /**
21
     * User identifier of sticker file owner
22
     * @var string
23
     */
24
    public $user_id = 0;
25
26
    /**
27
     * Png image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either
28
     * width or height must be exactly 512px
29
     * @var InputFile
30
     */
31
    public $png_sticker;
32
33
    /**
34
     * Gets the name of all mandatory fields
35
     * @return array
36
     */
37
    public function getMandatoryFields(): array
38
    {
39
        return [
40
            'user_id',
41
            'png_sticker',
42
        ];
43
    }
44
}
45