Passed
Pull Request — master (#408)
by Alexander
02:08 queued 28s
created

Venue::setLongitude()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: iGusev
5
 * Date: 14/04/16
6
 * Time: 15:45
7
 */
8
9
namespace TelegramBot\Api\Types\Inline\InputMessageContent;
10
11
use TelegramBot\Api\TypeInterface;
12
use TelegramBot\Api\Types\Inline\InputMessageContent;
13
14
/**
15
 * Class Venue
16
 * @see https://core.telegram.org/bots/api#inputvenuemessagecontent
17
 * Represents the content of a venue message to be sent as the result of an inline query.
18
 *
19
 * @package TelegramBot\Api\Types\Inline
20
 */
21
class Venue extends InputMessageContent implements TypeInterface
22
{
23
    /**
24
     * {@inheritdoc}
25
     *
26
     * @var array
27
     */
28
    static protected $requiredParams = ['latitude', 'longitude', 'title', 'address'];
29
30
    /**
31
     * {@inheritdoc}
32
     *
33
     * @var array
34
     */
35
    static protected $map = [
36
        'latitude' => true,
37
        'longitude' => true,
38
        'title' => true,
39
        'address' => true,
40
        'foursquare_id' => true
41
    ];
42
43
    /**
44
     * Latitude of the venue in degrees
45
     *
46
     * @var float
47
     */
48
    protected $latitude;
49
50
    /**
51
     * Longitude of the venue in degrees
52
     *
53
     * @var float
54
     */
55
    protected $longitude;
56
57
    /**
58
     * Name of the venue
59
     *
60
     * @var string
61
     */
62
    protected $title;
63
64
    /**
65
     * Address of the venue
66
     *
67
     * @var string
68
     */
69
    protected $address;
70
71
    /**
72
     * Optional. Foursquare identifier of the venue, if known
73
     *
74
     * @var string
75
     */
76
    protected $foursquareId;
77
78
    /**
79
     * Venue constructor.
80
     * @param float $latitude
81
     * @param float $longitude
82
     * @param string $title
83
     * @param string $address
84
     * @param string $foursquareId
85
     */
86
    public function __construct($latitude, $longitude, $title, $address, $foursquareId = null)
87
    {
88
        $this->latitude = $latitude;
89
        $this->longitude = $longitude;
90
        $this->title = $title;
91
        $this->address = $address;
92
        $this->foursquareId = $foursquareId;
93
    }
94
95
96
    /**
97
     * @return float
98
     */
99
    public function getLatitude()
100
    {
101
        return $this->latitude;
102
    }
103
104
    /**
105
     * @param float $latitude
106
     */
107
    public function setLatitude($latitude)
108
    {
109
        $this->latitude = $latitude;
110
    }
111
112
    /**
113
     * @return float
114
     */
115
    public function getLongitude()
116
    {
117
        return $this->longitude;
118
    }
119
120
    /**
121
     * @param float $longitude
122
     */
123
    public function setLongitude($longitude)
124
    {
125
        $this->longitude = $longitude;
126
    }
127
128
    /**
129
     * @return string
130
     */
131
    public function getTitle()
132
    {
133
        return $this->title;
134
    }
135
136
    /**
137
     * @param string $title
138
     */
139
    public function setTitle($title)
140
    {
141
        $this->title = $title;
142
    }
143
144
    /**
145
     * @return string
146
     */
147
    public function getAddress()
148
    {
149
        return $this->address;
150
    }
151
152
    /**
153
     * @param string $address
154
     */
155
    public function setAddress($address)
156
    {
157
        $this->address = $address;
158
    }
159
160
    /**
161
     * @return string
162
     */
163
    public function getFoursquareId()
164
    {
165
        return $this->foursquareId;
166
    }
167
168
    /**
169
     * @param string $foursquareId
170
     */
171
    public function setFoursquareId($foursquareId)
172
    {
173
        $this->foursquareId = $foursquareId;
174
    }
175
}
176