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

SendContact::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
 * Use this method to send phone contacts. On success, the sent Message is returned.
11
 *
12
 * Objects defined as-is july 2016
13
 *
14
 * @see https://core.telegram.org/bots/api#sendcontact
15
 */
16
class SendContact 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
     * Contact's phone number
26
     * @var string
27
     */
28
    public $phone_number = '';
29
30
    /**
31
     * Contact's first name
32
     * @var string
33
     */
34
    public $first_name = '';
35
36
    /**
37
     * Contact's last name
38
     * @var string
39
     */
40
    public $last_name = '';
41
42
    /**
43
     * Optional. Sends the message silently. iOS users will not receive a notification, Android users will receive a
44
     * notification with no sound.
45
     * @see https://telegram.org/blog/channels-2-0#silent-messages
46
     * @var bool
47
     */
48
    public $disable_notification = false;
49
50
    /**
51
     * If the message is a reply, ID of the original message
52
     * @var int
53
     */
54
    public $reply_to_message_id = 0;
55
56
    /**
57
     * Optional. Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to
58
     * hide keyboard or to force a reply from the user.
59
     * @var null
60
     */
61
    public $reply_markup = null;
62
63
    public function getMandatoryFields(): array
64
    {
65
        return [
66
            'chat_id',
67
            'phone_number',
68
            'first_name',
69
        ];
70
    }
71
}
72