Passed
Push — master ( 4c2b59...061776 )
by Shahrad
02:09
created

InlineQueryResultLocation   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 12
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
namespace TelegramBot\Entities\InlineQuery;
4
5
use TelegramBot\Entities\InlineKeyboard;
6
use TelegramBot\Entities\InputMessageContent\InputMessageContent;
7
8
/**
9
 * Class InlineQueryResultLocation
10
 *
11
 * @link https://core.telegram.org/bots/api#inlinequeryresultlocation
12
 *
13
 * <code>
14
 * $data = [
15
 *   'id'                     => '',
16
 *   'latitude'               => 36.0338,
17
 *   'longitude'              => 71.8601,
18
 *   'title'                  => '',
19
 *   'horizontal_accuracy'    => 36.9,
20
 *   'live_period'            => 900,
21
 *   'heading'                => 88,
22
 *   'proximity_alert_radius' => 300,
23
 *   'reply_markup'           => <InlineKeyboard>,
24
 *   'input_message_content'  => <InputMessageContent>,
25
 *   'thumb_url'              => '',
26
 *   'thumb_width'            => 30,
27
 *   'thumb_height'           => 30,
28
 * ];
29
 * </code>
30
 *
31
 * @method string              getType()                    Type of the result, must be location
32
 * @method string              getId()                      Unique identifier for this result, 1-64 Bytes
33
 * @method float               getLatitude()                Location latitude in degrees
34
 * @method float               getLongitude()               Location longitude in degrees
35
 * @method string              getTitle()                   Location title
36
 * @method float               getHorizontalAccuracy()      Optional. The radius of uncertainty for the location, measured in meters;
37
0-1500
38
 * @method int                 getLivePeriod()              Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
39
 * @method int                 getHeading()                 Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
40
 * @method int                 getProximityAlertRadius()    Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
41
 * @method InlineKeyboard      getReplyMarkup()             Optional. Inline keyboard attached to the message
42
 * @method InputMessageContent getInputMessageContent()     Optional. Content of the message to be sent instead of the location
43
 * @method string              getThumbUrl()                Optional. Url of the thumbnail for the result
44
 * @method int                 getThumbWidth()              Optional. Thumbnail width
45
 * @method int                 getThumbHeight()             Optional. Thumbnail height
46
 *
47
 * @method $this setId(string $id)                                                      Unique identifier for this result, 1-64 Bytes
48
 * @method $this setLatitude(float $latitude)                                           Location latitude in degrees
49
 * @method $this setLongitude(float $longitude)                                         Location longitude in degrees
50
 * @method $this setTitle(string $title)                                                Location title
51
 * @method $this setHorizontalAccuracy(float $horizontal_accuracy)                      Optional. The radius of uncertainty for the location, measured in meters;
52
0-1500
53
 * @method $this setLivePeriod(int $live_period)                                        Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
54
 * @method $this setHeading(int $heading)                                               Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
55
 * @method $this setProximityAlertRadius(int $proximity_alert_radius)                   Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
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 location
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 InlineQueryResultLocation extends InlineEntity implements InlineQueryResult
63
{
64
65
    /**
66
     * InlineQueryResultLocation constructor
67
     *
68
     * @param array $data
69
     */
70
    public function __construct(array $data = [])
71
    {
72
        $data['type'] = 'location';
73
        parent::__construct($data);
74
    }
75
76
}
77