Contact::setLastname()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace Dolibarr\Client\Domain\Contact;
5
6
use JMS\Serializer\Annotation as JMS;
7
use Webmozart\Assert\Assert;
8
9
final class Contact
10
{
11
    /**
12
     * @var string
13
     * @JMS\Type("string")
14
     */
15
    private $lastname;
16
17
    /**
18
     * @var string
19
     * @JMS\Type("string")
20
     */
21
    private $firstname;
22
23
    /**
24
     * @var string
25
     * @JMS\Type("string")
26
     */
27
    private $civilityCode;
28
29
    /**
30
     * @var string
31
     * @JMS\Type("string")
32
     */
33
    private $address;
34
35
    /**
36
     * @var string
37
     * @JMS\Type("string")
38
     */
39
    private $zip;
40
41
    /**
42
     * @var string
43
     * @JMS\Type("string")
44
     */
45
    private $town;
46
47
    /**
48
     * @var integer
49
     *
50
     * @JMS\SerializedName("socid")
51
     * @JMS\Type("int")
52
     */
53
    private $companyId;
54
55
    /**
56
     * @var boolean
57
     *
58
     * @JMS\SerializedName("status")
59
     * @JMS\Type("int")
60
     */
61
    private $enable;
62
63
    /**
64
     * @var string
65
     * @JMS\Type("string")
66
     */
67
    private $email;
68
69
    /**
70
     * @var string
71
     * @JMS\SerializedName("phone_peso")
72
     * @JMS\Type("string")
73
     */
74
    private $phone;
75
76
    /**
77
     * @var string
78
     *
79
     * @JMS\SerializedName("ref_ext")
80
     * @JMS\Type("string")
81
     */
82
    private $externalReference;
83
84
    /**
85
     * @param string $lastname
86
     */
87
    public function __construct($lastname)
88
    {
89
        Assert::stringNotEmpty($lastname);
90
        $this->lastname = $lastname;
91
    }
92
93
    /**
94
     * @return string
95
     */
96
    public function getLastname()
97
    {
98
        return $this->lastname;
99
    }
100
101
    /**
102
     * @param string $lastname
103
     */
104
    public function setLastname($lastname)
105
    {
106
        $this->lastname = $lastname;
107
    }
108
109
    /**
110
     * @return string
111
     */
112
    public function getFirstname()
113
    {
114
        return $this->firstname;
115
    }
116
117
    /**
118
     * @param string $firstname
119
     */
120
    public function setFirstname($firstname)
121
    {
122
        $this->firstname = $firstname;
123
    }
124
125
    /**
126
     * @return string
127
     */
128
    public function getCivilityCode()
129
    {
130
        return $this->civilityCode;
131
    }
132
133
    /**
134
     * @param string $civilityCode
135
     */
136
    public function setCivilityCode($civilityCode)
137
    {
138
        $this->civilityCode = $civilityCode;
139
    }
140
141
    /**
142
     * @return string
143
     */
144
    public function getAddress()
145
    {
146
        return $this->address;
147
    }
148
149
    /**
150
     * @param string $address
151
     */
152
    public function setAddress($address)
153
    {
154
        $this->address = $address;
155
    }
156
157
    /**
158
     * @return string
159
     */
160
    public function getZip()
161
    {
162
        return $this->zip;
163
    }
164
165
    /**
166
     * @param string $zip
167
     */
168
    public function setZip($zip)
169
    {
170
        $this->zip = $zip;
171
    }
172
173
    /**
174
     * @return string
175
     */
176
    public function getTown()
177
    {
178
        return $this->town;
179
    }
180
181
    /**
182
     * @param string $town
183
     */
184
    public function setTown($town)
185
    {
186
        $this->town = $town;
187
    }
188
189
    /**
190
     * @return int
191
     */
192
    public function getCompanyId()
193
    {
194
        return $this->companyId;
195
    }
196
197
    /**
198
     * @param int $companyId
199
     */
200
    public function setCompanyId($companyId)
201
    {
202
        $this->companyId = $companyId;
203
    }
204
205
    /**
206
     * @return bool
207
     */
208
    public function isEnable()
209
    {
210
        return $this->enable;
211
    }
212
213
    /**
214
     * @param bool $enable
215
     */
216
    public function setEnable($enable)
217
    {
218
        $this->enable = $enable;
219
    }
220
221
    /**
222
     * @return string
223
     */
224
    public function getEmail()
225
    {
226
        return $this->email;
227
    }
228
229
    /**
230
     * @param string $email
231
     */
232
    public function setEmail($email)
233
    {
234
        $this->email = $email;
235
    }
236
237
    /**
238
     * @return string
239
     */
240
    public function getPhone()
241
    {
242
        return $this->phone;
243
    }
244
245
    /**
246
     * @param string $phone
247
     */
248
    public function setPhone($phone)
249
    {
250
        $this->phone = $phone;
251
    }
252
253
    /**
254
     * @return string
255
     */
256
    public function getExternalReference()
257
    {
258
        return $this->externalReference;
259
    }
260
261
    /**
262
     * @param string $externalReference
263
     */
264
    public function setExternalReference($externalReference)
265
    {
266
        $this->externalReference = $externalReference;
267
    }
268
}
269