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

SendGame   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 43
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMandatoryFields() 0 7 1
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