InlineQueryResultContact   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 11
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the TelegramBot package.
5
 *
6
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Longman\TelegramBot\Entities\InlineQuery;
13
14
use Longman\TelegramBot\Entities\InlineKeyboard;
15
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent;
16
17
/**
18
 * Class InlineQueryResultContact
19
 *
20
 * @link https://core.telegram.org/bots/api#inlinequeryresultcontact
21
 *
22
 * <code>
23
 * $data = [
24
 *   'id'                    => '',
25
 *   'phone_number'          => '',
26
 *   'first_name'            => '',
27
 *   'last_name'             => '',
28
 *   'reply_markup'          => <InlineKeyboard>,
29
 *   'input_message_content' => <InputMessageContent>,
30
 *   'thumbnail_url'         => '',
31
 *   'thumbnail_width'       => 30,
32
 *   'thumbnail_height'      => 30,
33
 * ];
34
 * </code>
35
 *
36
 * @method string               getType()                Type of the result, must be contact
37
 * @method string               getId()                  Unique identifier for this result, 1-64 Bytes
38
 * @method string               getPhoneNumber()         Contact's phone number
39
 * @method string               getFirstName()           Contact's first name
40
 * @method string               getLastName()            Optional. Contact's last name
41
 * @method string               getVcard()               Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
42
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
43
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the contact
44
 * @method string               getThumbnailUrl()        Optional. Url of the thumbnail for the result
45
 * @method int                  getThumbnailWidth()      Optional. Thumbnail width
46
 * @method int                  getThumbnailHeight()     Optional. Thumbnail height
47
 *
48
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 Bytes
49
 * @method $this setPhoneNumber(string $phone_number)                               Contact's phone number
50
 * @method $this setFirstName(string $first_name)                                   Contact's first name
51
 * @method $this setLastName(string $last_name)                                     Optional. Contact's last name
52
 * @method $this setVcard(string $vcard)                                            Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
53
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
54
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the contact
55
 * @method $this setThumbnailUrl(string $thumbnail_url)                             Optional. Url of the thumbnail for the result
56
 * @method $this setThumbnailWidth(int $thumbnail_width)                            Optional. Thumbnail width
57
 * @method $this setThumbnailHeight(int $thumbnail_height)                          Optional. Thumbnail height
58
 */
59
class InlineQueryResultContact extends InlineEntity implements InlineQueryResult
60
{
61
    /**
62
     * InlineQueryResultContact constructor
63
     *
64
     * @param array $data
65
     */
66
    public function __construct(array $data = [])
67
    {
68
        $data['type'] = 'contact';
69
        parent::__construct($data);
70
    }
71
}
72