Contact   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 116
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
dl 0
loc 116
rs 10
c 1
b 0
f 0
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A setPhoneNumber() 0 3 1
A setVcard() 0 3 1
A getFirstName() 0 3 1
A getPhoneNumber() 0 3 1
A getLastName() 0 3 1
A getVcard() 0 3 1
A setFirstName() 0 3 1
A setUserId() 0 3 1
A getUserId() 0 3 1
A setLastName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zanzara\Telegram\Type\File;
6
7
/**
8
 * This object represents a phone contact.
9
 *
10
 * More on https://core.telegram.org/bots/api#contact
11
 */
12
class Contact
13
{
14
15
    /**
16
     * Contact's phone number
17
     *
18
     * @var string
19
     */
20
    private $phone_number;
21
22
    /**
23
     * Contact's first name
24
     *
25
     * @var string
26
     */
27
    private $first_name;
28
29
    /**
30
     * Optional. Contact's last name
31
     *
32
     * @var string|null
33
     */
34
    private $last_name;
35
36
    /**
37
     * Optional. Contact's user identifier in Telegram
38
     *
39
     * @var int|null
40
     */
41
    private $user_id;
42
43
    /**
44
     * Optional. Additional data about the contact in the form of a vCard
45
     *
46
     * @var string|null
47
     */
48
    private $vcard;
49
50
    /**
51
     * @return string
52
     */
53
    public function getPhoneNumber(): string
54
    {
55
        return $this->phone_number;
56
    }
57
58
    /**
59
     * @param string $phone_number
60
     */
61
    public function setPhoneNumber(string $phone_number): void
62
    {
63
        $this->phone_number = $phone_number;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getFirstName(): string
70
    {
71
        return $this->first_name;
72
    }
73
74
    /**
75
     * @param string $first_name
76
     */
77
    public function setFirstName(string $first_name): void
78
    {
79
        $this->first_name = $first_name;
80
    }
81
82
    /**
83
     * @return string|null
84
     */
85
    public function getLastName(): ?string
86
    {
87
        return $this->last_name;
88
    }
89
90
    /**
91
     * @param string|null $last_name
92
     */
93
    public function setLastName(?string $last_name): void
94
    {
95
        $this->last_name = $last_name;
96
    }
97
98
    /**
99
     * @return int|null
100
     */
101
    public function getUserId(): ?int
102
    {
103
        return $this->user_id;
104
    }
105
106
    /**
107
     * @param int|null $user_id
108
     */
109
    public function setUserId(?int $user_id): void
110
    {
111
        $this->user_id = $user_id;
112
    }
113
114
    /**
115
     * @return string|null
116
     */
117
    public function getVcard(): ?string
118
    {
119
        return $this->vcard;
120
    }
121
122
    /**
123
     * @param string|null $vcard
124
     */
125
    public function setVcard(?string $vcard): void
126
    {
127
        $this->vcard = $vcard;
128
    }
129
130
}