Completed
Push — master ( 4ede18...f88253 )
by Camilo
06:20
created

DeleteChatStickerSet::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
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 Psr\Log\LoggerInterface;
8
use unreal4u\TelegramAPI\Abstracts\TelegramMethods;
9
use unreal4u\TelegramAPI\Abstracts\TelegramTypes;
10
use unreal4u\TelegramAPI\InternalFunctionality\TelegramRawData;
11
use unreal4u\TelegramAPI\Telegram\Types\Custom\ResultBoolean;
12
13
/**
14
 * Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for
15
 * this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in
16
 * getChat requests to check if the bot can use this method. Returns True on success
17
 *
18
 * Objects defined as-is october 2017
19
 *
20
 * @see https://core.telegram.org/bots/api#deletechatstickerset
21
 */
22
class DeleteChatStickerSet extends TelegramMethods
23
{
24
    /**
25
     * Unique identifier for the target chat or username of the target supergroup or channel (in the format
26
     * @channelusername)
27
     * @var string
28
     */
29
    public $chat_id = '';
30
31
    public static function bindToObject(TelegramRawData $data, LoggerInterface $logger): TelegramTypes
32
    {
33
        return new ResultBoolean($data->getResultBoolean(), $logger);
34
    }
35
36
    public function getMandatoryFields(): array
37
    {
38
        return [
39
            'chat_id',
40
        ];
41
    }
42
}
43