Total Complexity | 2 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | class SendGameMethod |
||
16 | { |
||
17 | use FillFromArrayTrait; |
||
18 | use ReplyMarkupVariableTrait; |
||
19 | |||
20 | /** |
||
21 | * Unique identifier for the target chat. |
||
22 | * |
||
23 | * @var int |
||
24 | */ |
||
25 | public $chatId; |
||
26 | |||
27 | /** |
||
28 | * Short name of the game, serves as the unique identifier for the game. Set up your games via Botfather. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | public $gameShortName; |
||
33 | |||
34 | /** |
||
35 | * Sends the message silently. Users will receive a notification with no sound. |
||
36 | * |
||
37 | * @var bool|null |
||
38 | */ |
||
39 | public $disableNotification; |
||
40 | |||
41 | /** |
||
42 | * If the message is a reply, ID of the original message. |
||
43 | * |
||
44 | * @var int|null |
||
45 | */ |
||
46 | public $replyToMessageId; |
||
47 | |||
48 | /** |
||
49 | * @param int $chatId |
||
50 | * @param string $gameShortName |
||
51 | * @param array|null $data |
||
52 | * |
||
53 | * @throws \TgBotApi\BotApiBase\Exception\BadArgumentException |
||
54 | * |
||
55 | * @return SendGameMethod |
||
56 | */ |
||
57 | 1 | public static function create(int $chatId, string $gameShortName, array $data = null): SendGameMethod |
|
69 |