Completed
Push — master ( 203d4a...ef9e39 )
by
unknown
04:46 queued 02:35
created

InlineQueryResultVenue::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * This file is part of the TelegramBot package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Longman\TelegramBot\Entities\InlineQuery;
12
13
use Longman\TelegramBot\Entities\InlineKeyboard;
14
use Longman\TelegramBot\Entities\InputMessageContent\InputMessageContent;
15
16
/**
17
 * Class InlineQueryResultVenue
18
 *
19
 * @link https://core.telegram.org/bots/api#inlinequeryresultvenue
20
 *
21
 * <code>
22
 * $data = [
23
 *   'id'                    => '',
24
 *   'latitude'              => 36.0338,
25
 *   'longitude'             => 71.8601,
26
 *   'title'                 => '',
27
 *   'address'               => '',
28
 *   'foursquare_id'         => '',
29
 *   'reply_markup'          => <InlineKeyboard>,
30
 *   'input_message_content' => <InputMessageContent>,
31
 *   'thumb_url'             => '',
32
 *   'thumb_width'           => 30,
33
 *   'thumb_height'          => 30,
34
 * ];
35
 * </code>
36
 *
37
 * @method string               getType()                Type of the result, must be venue
38
 * @method string               getId()                  Unique identifier for this result, 1-64 Bytes
39
 * @method float                getLatitude()            Latitude of the venue location in degrees
40
 * @method float                getLongitude()           Longitude of the venue location in degrees
41
 * @method string               getTitle()               Title of the venue
42
 * @method string               getAddress()             Address of the venue
43
 * @method string               getFoursquareId()        Optional. Foursquare identifier of the venue if known
44
 * @method InlineKeyboard       getReplyMarkup()         Optional. Inline keyboard attached to the message
45
 * @method InputMessageContent  getInputMessageContent() Optional. Content of the message to be sent instead of the venue
46
 * @method string               getThumbUrl()            Optional. Url of the thumbnail for the result
47
 * @method int                  getThumbWidth()          Optional. Thumbnail width
48
 * @method int                  getThumbHeight()         Optional. Thumbnail height
49
 *
50
 * @method $this setId(string $id)                                                  Unique identifier for this result, 1-64 Bytes
51
 * @method $this setLatitude(float $latitude)                                       Latitude of the venue location in degrees
52
 * @method $this setLongitude(float $longitude)                                     Longitude of the venue location in degrees
53
 * @method $this setTitle(string $title)                                            Title of the venue
54
 * @method $this setAddress(string $address)                                        Address of the venue
55
 * @method $this setFoursquareId(string $foursquare_id)                             Optional. Foursquare identifier of the venue if known
56
 * @method $this setReplyMarkup(InlineKeyboard $reply_markup)                       Optional. Inline keyboard attached to the message
57
 * @method $this setInputMessageContent(InputMessageContent $input_message_content) Optional. Content of the message to be sent instead of the venue
58
 * @method $this setThumbUrl(string $thumb_url)                                     Optional. Url of the thumbnail for the result
59
 * @method $this setThumbWidth(int $thumb_width)                                    Optional. Thumbnail width
60
 * @method $this setThumbHeight(int $thumb_height)                                  Optional. Thumbnail height
61
 */
62
class InlineQueryResultVenue extends InlineEntity
63
{
64
    /**
65
     * InlineQueryResultVenue constructor
66
     *
67
     * @param array $data
68
     *
69
     * @throws \Longman\TelegramBot\Exception\TelegramException
70
     */
71
    public function __construct(array $data = [])
72
    {
73
        $data['type'] = 'venue';
74
        parent::__construct($data);
75
    }
76
}
77