ChatLocation   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 11
c 1
b 0
f 0
dl 0
loc 65
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLocation() 0 3 1
A getAddress() 0 3 1
A setLocation() 0 3 1
A setAddress() 0 3 1
1
<?php
2
3
namespace TelegramBot\Api\Types;
4
5
use TelegramBot\Api\BaseType;
6
use TelegramBot\Api\TypeInterface;
7
8
class ChatLocation extends BaseType implements TypeInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     *
13
     * @var array
14
     */
15
    protected static $requiredParams = ['location', 'address'];
16
17
    /**
18
     * {@inheritdoc}
19
     *
20
     * @var array
21
     */
22
    protected static $map = [
23
        'location' => Location::class,
24
        'address' => true,
25
    ];
26
27
    /**
28
     * The location to which the supergroup is connected. Can't be a live location.
29
     *
30
     * @var Location
31
     */
32
    protected $location;
33
34
    /**
35
     * Location address; 1-64 characters, as defined by the chat owner
36
     *
37
     * @var string
38
     */
39
    protected $address;
40
41
    /**
42
     * @return Location
43
     */
44 1
    public function getLocation()
45
    {
46 1
        return $this->location;
47
    }
48
49
    /**
50
     * @param Location $location
51
     * @return void
52 2
     */
53
    public function setLocation($location)
54 2
    {
55 2
        $this->location = $location;
56
    }
57
58
    /**
59
     * @return string
60 1
     */
61
    public function getAddress()
62 1
    {
63
        return $this->address;
64
    }
65
66
    /**
67
     * @param string $address
68 2
     * @return void
69
     */
70 2
    public function setAddress($address)
71 2
    {
72
        $this->address = $address;
73
    }
74
}
75