Completed
Push — master ( 54e92f...46abfb )
by Camilo
04:46
created

SendGame::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 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\Inline\Keyboard\Markup;
9
10
/**
11
 * Use this method to send a game. On success, the sent Message is returned.
12
 *
13
 * Objects defined as-is December 2016
14
 *
15
 * @see https://core.telegram.org/bots/api#sendgame
16
 */
17
class SendGame extends TelegramMethods
18
{
19
    /**
20
     * Unique identifier for the target chat
21
     * @var int
22
     */
23
    public $chat_id = 0;
24
25
    /**
26
     * Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather.
27
     * @var float
28
     */
29
    public $game_short_name = '';
30
31
    /**
32
     * Optional. Sends the message silently. iOS users will not receive a notification, Android users will receive a
33
     * notification with no sound.
34
     * @see https://telegram.org/blog/channels-2-0#silent-messages
35
     * @var bool
36
     */
37
    public $disable_notification = false;
38
39
    /**
40
     * If the message is a reply, ID of the original message
41
     * @var int
42
     */
43
    public $reply_to_message_id = 0;
44
45
    /**
46
     * Optional. Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to
47
     * hide keyboard or to force a reply from the user.
48
     * @var Markup
49
     */
50
    public $reply_markup;
51
52
    public function getMandatoryFields(): array
53
    {
54
        return [
55
            'chat_id',
56
            'game_short_name',
57
        ];
58
    }
59
}
60