InputLocationMessageContent   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 147
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
dl 0
loc 147
rs 10
c 1
b 0
f 0
wmc 12

12 Methods

Rating   Name   Duplication   Size   Complexity  
A getLongitude() 0 3 1
A getLivePeriod() 0 3 1
A getHorizontalAccuracy() 0 3 1
A getHeading() 0 3 1
A setLatitude() 0 3 1
A setProximityAlertRadius() 0 3 1
A setHeading() 0 3 1
A setLongitude() 0 3 1
A getProximityAlertRadius() 0 3 1
A getLatitude() 0 3 1
A setHorizontalAccuracy() 0 3 1
A setLivePeriod() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\Input;
6
/**
7
 * Represents the content of a location message to be sent as the result of an inline query.
8
 *
9
 * More on https://core.telegram.org/bots/api#inputlocationmessagecontent
10
 */
11
class InputLocationMessageContent extends InputMessageContent
12
{
13
14
    /**
15
     * Latitude of the location in degrees
16
     *
17
     * @var float
18
     */
19
    private $latitude;
20
21
    /**
22
     * Longitude of the location in degrees
23
     *
24
     * @var float
25
     */
26
    private $longitude;
27
28
    /**
29
     * Optional. The radius of uncertainty for the location, measured in meters; 0-1500
30
     *
31
     * @since zanzara 0.5.0, Telegram Bot Api 5.0
32
     *
33
     * @var float|null
34
     */
35
    private $horizontal_accuracy;
36
37
    /**
38
     * Optional. Period in seconds for which the location can be updated, should be between 60 and 86400.
39
     *
40
     * @var int|null
41
     */
42
    private $live_period;
43
44
    /**
45
     * Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if
46
     * specified.
47
     *
48
     * @since zanzara 0.5.0, Telegram Bot Api 5.0
49
     *
50
     * @var int|null
51
     */
52
    private $heading;
53
54
    /**
55
     * Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member,
56
     * in meters. Must be between 1 and 100000 if specified.
57
     *
58
     * @since zanzara 0.5.0, Telegram Bot Api 5.0
59
     *
60
     * @var int|null
61
     */
62
    private $proximity_alert_radius;
63
64
    /**
65
     * @return float
66
     */
67
    public function getLatitude(): float
68
    {
69
        return $this->latitude;
70
    }
71
72
    /**
73
     * @param float $latitude
74
     */
75
    public function setLatitude(float $latitude): void
76
    {
77
        $this->latitude = $latitude;
78
    }
79
80
    /**
81
     * @return float
82
     */
83
    public function getLongitude(): float
84
    {
85
        return $this->longitude;
86
    }
87
88
    /**
89
     * @param float $longitude
90
     */
91
    public function setLongitude(float $longitude): void
92
    {
93
        $this->longitude = $longitude;
94
    }
95
96
    /**
97
     * @return int|null
98
     */
99
    public function getLivePeriod(): ?int
100
    {
101
        return $this->live_period;
102
    }
103
104
    /**
105
     * @param int|null $live_period
106
     */
107
    public function setLivePeriod(?int $live_period): void
108
    {
109
        $this->live_period = $live_period;
110
    }
111
112
    /**
113
     * @return int|null
114
     */
115
    public function getHeading(): ?int
116
    {
117
        return $this->heading;
118
    }
119
120
    /**
121
     * @param int|null $heading
122
     */
123
    public function setHeading(?int $heading): void
124
    {
125
        $this->heading = $heading;
126
    }
127
128
    /**
129
     * @return int|null
130
     */
131
    public function getProximityAlertRadius(): ?int
132
    {
133
        return $this->proximity_alert_radius;
134
    }
135
136
    /**
137
     * @param int|null $proximity_alert_radius
138
     */
139
    public function setProximityAlertRadius(?int $proximity_alert_radius): void
140
    {
141
        $this->proximity_alert_radius = $proximity_alert_radius;
142
    }
143
144
    /**
145
     * @return float|null
146
     */
147
    public function getHorizontalAccuracy(): ?float
148
    {
149
        return $this->horizontal_accuracy;
150
    }
151
152
    /**
153
     * @param float|null $horizontal_accuracy
154
     */
155
    public function setHorizontalAccuracy(?float $horizontal_accuracy): void
156
    {
157
        $this->horizontal_accuracy = $horizontal_accuracy;
158
    }
159
160
}