Completed
Push — develop ( 23b8a0...80c8c3 )
by Michele
11:06
created

Location::getLivePeriod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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