Completed
Push — master ( e9eebf...b866da )
by Gusev
03:01
created

Contact   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 6
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 89
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getPhoneNumber() 0 4 1
A setPhoneNumber() 0 4 1
A getFirstName() 0 4 1
A setFirstName() 0 4 1
A getLastName() 0 4 1
A setLastName() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: iGusev
5
 * Date: 14/04/16
6
 * Time: 16:01
7
 */
8
9
namespace TelegramBot\Api\Types\Inline\InputMessageContent;
10
11
use TelegramBot\Api\BaseType;
12
use TelegramBot\Api\TypeInterface;
13
14
/**
15
 * Class Contact
16
 * @see https://core.telegram.org/bots/api#inputcontactmessagecontent
17
 * 
18
 * Represents the content of a contact message to be sent as the result of an inline query.
19
 *
20
 * @package TelegramBot\Api\Types\Inline
21
 */
22
class Contact extends BaseType implements TypeInterface
23
{
24
    /**
25
     * {@inheritdoc}
26
     *
27
     * @var array
28
     */
29
    static protected $requiredParams = ['phone_number', 'first_name'];
30
31
    /**
32
     * {@inheritdoc}
33
     *
34
     * @var array
35
     */
36
    static protected $map = [
37
        'phone_number' => true,
38
        'first_name' => true,
39
        'last_name' => true
40
    ];
41
42
    /**
43
     * Contact's phone number
44
     *
45
     * @var string
46
     */
47
    protected $phoneNumber;
48
49
    /**
50
     * Contact's first name
51
     *
52
     * @var string
53
     */
54
    protected $firstName;
55
56
    /**
57
     * Optional. Contact's last name
58
     *
59
     * @var string
60
     */
61
    protected $lastName;
62
63
    /**
64
     * @return string
65
     */
66
    public function getPhoneNumber()
67
    {
68
        return $this->phoneNumber;
69
    }
70
71
    /**
72
     * @param string $phoneNumber
73
     */
74
    public function setPhoneNumber($phoneNumber)
75
    {
76
        $this->phoneNumber = $phoneNumber;
77
    }
78
79
    /**
80
     * @return mixed
81
     */
82
    public function getFirstName()
83
    {
84
        return $this->firstName;
85
    }
86
87
    /**
88
     * @param mixed $firstName
89
     */
90
    public function setFirstName($firstName)
91
    {
92
        $this->firstName = $firstName;
93
    }
94
95
    /**
96
     * @return string
97
     */
98
    public function getLastName()
99
    {
100
        return $this->lastName;
101
    }
102
103
    /**
104
     * @param string $lastName
105
     */
106
    public function setLastName($lastName)
107
    {
108
        $this->lastName = $lastName;
109
    }
110
}
111