Completed
Push — master ( e9eebf...b866da )
by Gusev
03:01
created

Location   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 65
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLatitude() 0 4 1
A setLatitude() 0 4 1
A getLongitude() 0 4 1
A setLongitude() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: iGusev
5
 * Date: 14/04/16
6
 * Time: 15:41
7
 */
8
9
namespace TelegramBot\Api\Types\Inline;
10
11
use TelegramBot\Api\BaseType;
12
use TelegramBot\Api\TypeInterface;
13
14
/**
15
 * Class Location
16
 * @see https://core.telegram.org/bots/api#inputlocationmessagecontent
17
 *
18
 * Represents the content of a location message to be sent as the result of an inline query.
19
 *
20
 * @package TelegramBot\Api\Types\Inline
21
 */
22
class Location extends BaseType implements TypeInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     *
27
     * @var array
28
     */
29
    static protected $requiredParams = ['latitude', 'longitude'];
30
31
    /**
32
     * {@inheritdoc}
33
     *
34
     * @var array
35
     */
36
    static protected $map = [
37
        'latitude' => true,
38
        'longitude' => true
39
    ];
40
41
    /**
42
     * Latitude of the location in degrees
43
     *
44
     * @var float
45
     */
46
    protected $latitude;
47
48
    /**
49
     * Longitude of the location in degrees
50
     *
51
     * @var float
52
     */
53
    protected $longitude;
54
55
    /**
56
     * @return float
57
     */
58
    public function getLatitude()
59
    {
60
        return $this->latitude;
61
    }
62
63
    /**
64
     * @param float $latitude
65
     */
66
    public function setLatitude($latitude)
67
    {
68
        $this->latitude = $latitude;
69
    }
70
71
    /**
72
     * @return float
73
     */
74
    public function getLongitude()
75
    {
76
        return $this->longitude;
77
    }
78
79
    /**
80
     * @param float $longitude
81
     */
82
    public function setLongitude($longitude)
83
    {
84
        $this->longitude = $longitude;
85
    }
86
}
87