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

ForwardMessage::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 5
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
9
/**
10
 * Object that resembles a message object in Telegram
11
 *
12
 * Objects defined as-is july 2016
13
 *
14
 * @see https://core.telegram.org/bots/api#forwardmessage
15
 */
16
class ForwardMessage extends TelegramMethods
17
{
18
    /**
19
     * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
20
     * @var string
21
     */
22
    public $chat_id = '';
23
24
    /**
25
     * Unique identifier for the chat where the original message was sent (or channel username in the
26
     * format @channelusername)
27
     * @var string
28
     */
29
    public $from_chat_id = '';
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
     * Unique message identifier
41
     * @var int
42
     */
43
    public $message_id = 0;
44
45
    public function getMandatoryFields(): array
46
    {
47
        return [
48
            'chat_id',
49
            'from_chat_id',
50
            'message_id',
51
        ];
52
    }
53
}
54