ChatLocation::getAddress()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 1
cts 1
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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