Passed
Pull Request — master (#408)
by Alexander
01:37
created

Venue   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 111
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 8
eloc 19
c 1
b 0
f 1
dl 0
loc 111
ccs 0
cts 31
cp 0
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setLocation() 0 3 1
A getLocation() 0 3 1
A setTitle() 0 3 1
A setAddress() 0 3 1
A setFoursquareId() 0 3 1
A getFoursquareId() 0 3 1
A getTitle() 0 3 1
A getAddress() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: iGusev
5
 * Date: 13/04/16
6
 * Time: 13:55
7
 */
8
9
namespace TelegramBot\Api\Types;
10
11
use TelegramBot\Api\BaseType;
12
use TelegramBot\Api\TypeInterface;
13
14
/**
15
 * Class Venue
16
 * This object represents a venue
17
 *
18
 * @package TelegramBot\Api\Types
19
 */
20
class Venue extends BaseType implements TypeInterface
21
{
22
    /**
23
     * {@inheritdoc}
24
     *
25
     * @var array
26
     */
27
    static protected $requiredParams = ['location', 'title', 'address'];
28
29
    /**
30
     * {@inheritdoc}
31
     *
32
     * @var array
33
     */
34
    static protected $map = [
35
        'location' => Location::class,
36
        'title' => true,
37
        'address' => true,
38
        'foursquare_id' => true,
39
    ];
40
41
    /**
42
     * Venue location
43
     *
44
     * @var Location
45
     */
46
    protected $location;
47
48
    /**
49
     * Name of the venue
50
     *
51
     * @var string
52
     */
53
    protected $title;
54
55
    /**
56
     * Address of the venue
57
     *
58
     * @var string
59
     */
60
    protected $address;
61
62
    /**
63
     * Optional. Foursquare identifier of the venue
64
     *
65
     * @var string
66
     */
67
    protected $foursquareId;
68
69
    /**
70
     * @return Location
71
     */
72
    public function getLocation()
73
    {
74
        return $this->location;
75
    }
76
77
    /**
78
     * @param Location $location
79
     */
80
    public function setLocation($location)
81
    {
82
        $this->location = $location;
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function getTitle()
89
    {
90
        return $this->title;
91
    }
92
93
    /**
94
     * @param string $title
95
     */
96
    public function setTitle($title)
97
    {
98
        $this->title = $title;
99
    }
100
101
    /**
102
     * @return string
103
     */
104
    public function getAddress()
105
    {
106
        return $this->address;
107
    }
108
109
    /**
110
     * @param string $address
111
     */
112
    public function setAddress($address)
113
    {
114
        $this->address = $address;
115
    }
116
117
    /**
118
     * @return string
119
     */
120
    public function getFoursquareId()
121
    {
122
        return $this->foursquareId;
123
    }
124
125
    /**
126
     * @param string $foursquareId
127
     */
128
    public function setFoursquareId($foursquareId)
129
    {
130
        $this->foursquareId = $foursquareId;
131
    }
132
}
133