Test Failed
Pull Request — master (#306)
by Eldar
03:21 queued 28s
created

ChatLocation   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 65
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLocation() 0 4 1
A setLocation() 0 4 1
A getAddress() 0 4 1
A setAddress() 0 4 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
    static protected $requiredParams = ['location', 'address'];
16
17
    /**
18
     * {@inheritdoc}
19
     *
20
     * @var array
21
     */
22
    static protected $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
     */
52 1
    public function setLocation($location)
53
    {
54 1
        $this->location = $location;
55 1
    }
56
57
    /**
58
     * @return string
59
     */
60 1
    public function getAddress()
61
    {
62 1
        return $this->address;
63
    }
64
65
    /**
66
     * @param string $address
67
     */
68 1
    public function setAddress($address)
69
    {
70 1
        $this->address = $address;
71 1
    }
72
}
73