ChatLocation   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 47
rs 10
c 1
b 0
f 0
wmc 4

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
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type;
6
7
use Zanzara\Telegram\Type\File\Location;
8
9
/**
10
 * Represents a location to which a chat is connected.
11
 *
12
 * @since zanzara 0.5.0, Telegram Bot Api 5.0
13
 *
14
 */
15
class ChatLocation
16
{
17
18
    /**
19
     * The location to which the supergroup is connected. Can't be a live location.
20
     *
21
     * @var Location
22
     */
23
    private $location;
24
25
    /**
26
     * Location address; 1-64 characters, as defined by the chat owner
27
     *
28
     * @var string
29
     */
30
    private $address;
31
32
    /**
33
     * @return Location
34
     */
35
    public function getLocation(): Location
36
    {
37
        return $this->location;
38
    }
39
40
    /**
41
     * @param Location $location
42
     */
43
    public function setLocation(Location $location): void
44
    {
45
        $this->location = $location;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getAddress(): string
52
    {
53
        return $this->address;
54
    }
55
56
    /**
57
     * @param string $address
58
     */
59
    public function setAddress(string $address): void
60
    {
61
        $this->address = $address;
62
    }
63
64
}
65