Venue::getTitle()   A
last analyzed

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 1
cp 0
rs 10
cc 1
nc 1
nop 0
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
    protected static $requiredParams = ['latitude', 'longitude', 'title', 'address'];
29
30
    /**
31
     * {@inheritdoc}
32
     *
33
     * @var array
34
     */
35
    protected static $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|null
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|null $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
     * @return float
97
     */
98
    public function getLatitude()
99
    {
100
        return $this->latitude;
101
    }
102
103
    /**
104
     * @param float $latitude
105
     *
106
     * @return void
107
     */
108
    public function setLatitude($latitude)
109
    {
110
        $this->latitude = $latitude;
111
    }
112
113
    /**
114
     * @return float
115
     */
116
    public function getLongitude()
117
    {
118
        return $this->longitude;
119
    }
120
121
    /**
122
     * @param float $longitude
123
     *
124
     * @return void
125
     */
126
    public function setLongitude($longitude)
127
    {
128
        $this->longitude = $longitude;
129
    }
130
131
    /**
132
     * @return string
133
     */
134
    public function getTitle()
135
    {
136
        return $this->title;
137
    }
138
139
    /**
140
     * @param string $title
141
     *
142
     * @return void
143
     */
144
    public function setTitle($title)
145
    {
146
        $this->title = $title;
147
    }
148
149
    /**
150
     * @return string
151
     */
152
    public function getAddress()
153
    {
154
        return $this->address;
155
    }
156
157
    /**
158
     * @param string $address
159
     *
160
     * @return void
161
     */
162
    public function setAddress($address)
163
    {
164
        $this->address = $address;
165
    }
166
167
    /**
168
     * @return string|null
169
     */
170
    public function getFoursquareId()
171
    {
172
        return $this->foursquareId;
173
    }
174
175
    /**
176
     * @param string|null $foursquareId
177
     *
178
     * @return void
179
     */
180
    public function setFoursquareId($foursquareId)
181
    {
182
        $this->foursquareId = $foursquareId;
183
    }
184
}
185