Completed
Push — master ( a4a0d7...5dd6ba )
by Camilo
07:16
created

EditMessageText::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
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 edit text messages sent by the bot or via the bot (for inline bots). On success, if edited message
12
 * is sent by the bot, the edited Message is returned, otherwise True is returned
13
 *
14
 * Objects defined as-is july 2016
15
 *
16
 * @see https://core.telegram.org/bots/api#editmessagetext
17
 */
18
class EditMessageText extends TelegramMethods
19
{
20
    /**
21
     * Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target
22
     * channel (in the format @channelusername)
23
     * @var string
24
     */
25
    public $chat_id = '';
26
27
    /**
28
     * Required if inline_message_id is not specified. Unique identifier of the sent message
29
     * @var int
30
     */
31
    public $message_id = 0;
32
33
    /**
34
     * Required if chat_id and message_id are not specified. Identifier of the inline message
35
     * @var string
36
     */
37
    public $inline_message_id = '';
38
39
    /**
40
     * New text of the message
41
     * @var string
42
     */
43
    public $text = '';
44
45
    /**
46
     * Optional. Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs
47
     * in your bot's message
48
     * @var string
49
     */
50
    public $parse_mode = '';
51
52
    /**
53
     * Optional. Disables link previews for links in this message
54
     * @var boolean
55
     */
56
    public $disable_web_page_preview = false;
57
58
    /**
59
     * Optional. A JSON-serialized object for an inline keyboard.
60
     * @var Markup
61
     */
62
    public $reply_markup = null;
63
64
    public function getMandatoryFields(): array
65
    {
66
        return [
67
            'text',
68
        ];
69
    }
70
}
71