NicUpdateIT::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 16
nc 1
nop 15
dl 0
loc 18
rs 9.7333
c 0
b 0
f 0

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
namespace Ovh\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for nicUpdateIT StructType
9
 * @subpackage Structs
10
 * @author WsdlToPhp <[email protected]>
11
 */
12
class NicUpdateIT extends AbstractStructBase
13
{
14
    /**
15
     * The session
16
     * Meta information extracted from the WSDL
17
     * - nillable: true
18
     * @var string
19
     */
20
    public $session;
21
    /**
22
     * The nic
23
     * Meta information extracted from the WSDL
24
     * - nillable: true
25
     * @var string
26
     */
27
    public $nic;
28
    /**
29
     * The name
30
     * Meta information extracted from the WSDL
31
     * - nillable: true
32
     * @var string
33
     */
34
    public $name;
35
    /**
36
     * The firstname
37
     * Meta information extracted from the WSDL
38
     * - nillable: true
39
     * @var string
40
     */
41
    public $firstname;
42
    /**
43
     * The sex
44
     * Meta information extracted from the WSDL
45
     * - nillable: true
46
     * @var string
47
     */
48
    public $sex;
49
    /**
50
     * The legalForm
51
     * Meta information extracted from the WSDL
52
     * - nillable: true
53
     * @var string
54
     */
55
    public $legalForm;
56
    /**
57
     * The organisation
58
     * Meta information extracted from the WSDL
59
     * - nillable: true
60
     * @var string
61
     */
62
    public $organisation;
63
    /**
64
     * The legalName
65
     * Meta information extracted from the WSDL
66
     * - nillable: true
67
     * @var string
68
     */
69
    public $legalName;
70
    /**
71
     * The legalNumber
72
     * Meta information extracted from the WSDL
73
     * - nillable: true
74
     * @var string
75
     */
76
    public $legalNumber;
77
    /**
78
     * The vat
79
     * Meta information extracted from the WSDL
80
     * - nillable: true
81
     * @var string
82
     */
83
    public $vat;
84
    /**
85
     * The birthDay
86
     * Meta information extracted from the WSDL
87
     * - nillable: true
88
     * @var string
89
     */
90
    public $birthDay;
91
    /**
92
     * The birthCity
93
     * Meta information extracted from the WSDL
94
     * - nillable: true
95
     * @var string
96
     */
97
    public $birthCity;
98
    /**
99
     * The nationalIdentificationNumber
100
     * Meta information extracted from the WSDL
101
     * - nillable: true
102
     * @var string
103
     */
104
    public $nationalIdentificationNumber;
105
    /**
106
     * The companyNationalIdentificationNumber
107
     * Meta information extracted from the WSDL
108
     * - nillable: true
109
     * @var string
110
     */
111
    public $companyNationalIdentificationNumber;
112
    /**
113
     * The corporationType
114
     * Meta information extracted from the WSDL
115
     * - nillable: true
116
     * @var string
117
     */
118
    public $corporationType;
119
    /**
120
     * Constructor method for nicUpdateIT
121
     * @uses NicUpdateIT::setSession()
122
     * @uses NicUpdateIT::setNic()
123
     * @uses NicUpdateIT::setName()
124
     * @uses NicUpdateIT::setFirstname()
125
     * @uses NicUpdateIT::setSex()
126
     * @uses NicUpdateIT::setLegalForm()
127
     * @uses NicUpdateIT::setOrganisation()
128
     * @uses NicUpdateIT::setLegalName()
129
     * @uses NicUpdateIT::setLegalNumber()
130
     * @uses NicUpdateIT::setVat()
131
     * @uses NicUpdateIT::setBirthDay()
132
     * @uses NicUpdateIT::setBirthCity()
133
     * @uses NicUpdateIT::setNationalIdentificationNumber()
134
     * @uses NicUpdateIT::setCompanyNationalIdentificationNumber()
135
     * @uses NicUpdateIT::setCorporationType()
136
     * @param string $session
137
     * @param string $nic
138
     * @param string $name
139
     * @param string $firstname
140
     * @param string $sex
141
     * @param string $legalForm
142
     * @param string $organisation
143
     * @param string $legalName
144
     * @param string $legalNumber
145
     * @param string $vat
146
     * @param string $birthDay
147
     * @param string $birthCity
148
     * @param string $nationalIdentificationNumber
149
     * @param string $companyNationalIdentificationNumber
150
     * @param string $corporationType
151
     */
152
    public function __construct($session = null, $nic = null, $name = null, $firstname = null, $sex = null, $legalForm = null, $organisation = null, $legalName = null, $legalNumber = null, $vat = null, $birthDay = null, $birthCity = null, $nationalIdentificationNumber = null, $companyNationalIdentificationNumber = null, $corporationType = null)
153
    {
154
        $this
155
            ->setSession($session)
156
            ->setNic($nic)
157
            ->setName($name)
158
            ->setFirstname($firstname)
159
            ->setSex($sex)
160
            ->setLegalForm($legalForm)
161
            ->setOrganisation($organisation)
162
            ->setLegalName($legalName)
163
            ->setLegalNumber($legalNumber)
164
            ->setVat($vat)
165
            ->setBirthDay($birthDay)
166
            ->setBirthCity($birthCity)
167
            ->setNationalIdentificationNumber($nationalIdentificationNumber)
168
            ->setCompanyNationalIdentificationNumber($companyNationalIdentificationNumber)
169
            ->setCorporationType($corporationType);
170
    }
171
    /**
172
     * Get session value
173
     * @return string|null
174
     */
175
    public function getSession()
176
    {
177
        return $this->session;
178
    }
179
    /**
180
     * Set session value
181
     * @param string $session
182
     * @return \Ovh\StructType\NicUpdateIT
183
     */
184
    public function setSession($session = null)
185
    {
186
        // validation for constraint: string
187
        if (!is_null($session) && !is_string($session)) {
0 ignored issues
show
introduced by
The condition is_string($session) is always true.
Loading history...
188
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($session, true), gettype($session)), __LINE__);
189
        }
190
        $this->session = $session;
191
        return $this;
192
    }
193
    /**
194
     * Get nic value
195
     * @return string|null
196
     */
197
    public function getNic()
198
    {
199
        return $this->nic;
200
    }
201
    /**
202
     * Set nic value
203
     * @param string $nic
204
     * @return \Ovh\StructType\NicUpdateIT
205
     */
206
    public function setNic($nic = null)
207
    {
208
        // validation for constraint: string
209
        if (!is_null($nic) && !is_string($nic)) {
0 ignored issues
show
introduced by
The condition is_string($nic) is always true.
Loading history...
210
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nic, true), gettype($nic)), __LINE__);
211
        }
212
        $this->nic = $nic;
213
        return $this;
214
    }
215
    /**
216
     * Get name value
217
     * @return string|null
218
     */
219
    public function getName()
220
    {
221
        return $this->name;
222
    }
223
    /**
224
     * Set name value
225
     * @param string $name
226
     * @return \Ovh\StructType\NicUpdateIT
227
     */
228
    public function setName($name = null)
229
    {
230
        // validation for constraint: string
231
        if (!is_null($name) && !is_string($name)) {
0 ignored issues
show
introduced by
The condition is_string($name) is always true.
Loading history...
232
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
233
        }
234
        $this->name = $name;
235
        return $this;
236
    }
237
    /**
238
     * Get firstname value
239
     * @return string|null
240
     */
241
    public function getFirstname()
242
    {
243
        return $this->firstname;
244
    }
245
    /**
246
     * Set firstname value
247
     * @param string $firstname
248
     * @return \Ovh\StructType\NicUpdateIT
249
     */
250
    public function setFirstname($firstname = null)
251
    {
252
        // validation for constraint: string
253
        if (!is_null($firstname) && !is_string($firstname)) {
0 ignored issues
show
introduced by
The condition is_string($firstname) is always true.
Loading history...
254
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($firstname, true), gettype($firstname)), __LINE__);
255
        }
256
        $this->firstname = $firstname;
257
        return $this;
258
    }
259
    /**
260
     * Get sex value
261
     * @return string|null
262
     */
263
    public function getSex()
264
    {
265
        return $this->sex;
266
    }
267
    /**
268
     * Set sex value
269
     * @param string $sex
270
     * @return \Ovh\StructType\NicUpdateIT
271
     */
272
    public function setSex($sex = null)
273
    {
274
        // validation for constraint: string
275
        if (!is_null($sex) && !is_string($sex)) {
0 ignored issues
show
introduced by
The condition is_string($sex) is always true.
Loading history...
276
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($sex, true), gettype($sex)), __LINE__);
277
        }
278
        $this->sex = $sex;
279
        return $this;
280
    }
281
    /**
282
     * Get legalForm value
283
     * @return string|null
284
     */
285
    public function getLegalForm()
286
    {
287
        return $this->legalForm;
288
    }
289
    /**
290
     * Set legalForm value
291
     * @param string $legalForm
292
     * @return \Ovh\StructType\NicUpdateIT
293
     */
294
    public function setLegalForm($legalForm = null)
295
    {
296
        // validation for constraint: string
297
        if (!is_null($legalForm) && !is_string($legalForm)) {
0 ignored issues
show
introduced by
The condition is_string($legalForm) is always true.
Loading history...
298
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($legalForm, true), gettype($legalForm)), __LINE__);
299
        }
300
        $this->legalForm = $legalForm;
301
        return $this;
302
    }
303
    /**
304
     * Get organisation value
305
     * @return string|null
306
     */
307
    public function getOrganisation()
308
    {
309
        return $this->organisation;
310
    }
311
    /**
312
     * Set organisation value
313
     * @param string $organisation
314
     * @return \Ovh\StructType\NicUpdateIT
315
     */
316
    public function setOrganisation($organisation = null)
317
    {
318
        // validation for constraint: string
319
        if (!is_null($organisation) && !is_string($organisation)) {
0 ignored issues
show
introduced by
The condition is_string($organisation) is always true.
Loading history...
320
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($organisation, true), gettype($organisation)), __LINE__);
321
        }
322
        $this->organisation = $organisation;
323
        return $this;
324
    }
325
    /**
326
     * Get legalName value
327
     * @return string|null
328
     */
329
    public function getLegalName()
330
    {
331
        return $this->legalName;
332
    }
333
    /**
334
     * Set legalName value
335
     * @param string $legalName
336
     * @return \Ovh\StructType\NicUpdateIT
337
     */
338
    public function setLegalName($legalName = null)
339
    {
340
        // validation for constraint: string
341
        if (!is_null($legalName) && !is_string($legalName)) {
0 ignored issues
show
introduced by
The condition is_string($legalName) is always true.
Loading history...
342
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($legalName, true), gettype($legalName)), __LINE__);
343
        }
344
        $this->legalName = $legalName;
345
        return $this;
346
    }
347
    /**
348
     * Get legalNumber value
349
     * @return string|null
350
     */
351
    public function getLegalNumber()
352
    {
353
        return $this->legalNumber;
354
    }
355
    /**
356
     * Set legalNumber value
357
     * @param string $legalNumber
358
     * @return \Ovh\StructType\NicUpdateIT
359
     */
360
    public function setLegalNumber($legalNumber = null)
361
    {
362
        // validation for constraint: string
363
        if (!is_null($legalNumber) && !is_string($legalNumber)) {
0 ignored issues
show
introduced by
The condition is_string($legalNumber) is always true.
Loading history...
364
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($legalNumber, true), gettype($legalNumber)), __LINE__);
365
        }
366
        $this->legalNumber = $legalNumber;
367
        return $this;
368
    }
369
    /**
370
     * Get vat value
371
     * @return string|null
372
     */
373
    public function getVat()
374
    {
375
        return $this->vat;
376
    }
377
    /**
378
     * Set vat value
379
     * @param string $vat
380
     * @return \Ovh\StructType\NicUpdateIT
381
     */
382
    public function setVat($vat = null)
383
    {
384
        // validation for constraint: string
385
        if (!is_null($vat) && !is_string($vat)) {
0 ignored issues
show
introduced by
The condition is_string($vat) is always true.
Loading history...
386
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($vat, true), gettype($vat)), __LINE__);
387
        }
388
        $this->vat = $vat;
389
        return $this;
390
    }
391
    /**
392
     * Get birthDay value
393
     * @return string|null
394
     */
395
    public function getBirthDay()
396
    {
397
        return $this->birthDay;
398
    }
399
    /**
400
     * Set birthDay value
401
     * @param string $birthDay
402
     * @return \Ovh\StructType\NicUpdateIT
403
     */
404
    public function setBirthDay($birthDay = null)
405
    {
406
        // validation for constraint: string
407
        if (!is_null($birthDay) && !is_string($birthDay)) {
0 ignored issues
show
introduced by
The condition is_string($birthDay) is always true.
Loading history...
408
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($birthDay, true), gettype($birthDay)), __LINE__);
409
        }
410
        $this->birthDay = $birthDay;
411
        return $this;
412
    }
413
    /**
414
     * Get birthCity value
415
     * @return string|null
416
     */
417
    public function getBirthCity()
418
    {
419
        return $this->birthCity;
420
    }
421
    /**
422
     * Set birthCity value
423
     * @param string $birthCity
424
     * @return \Ovh\StructType\NicUpdateIT
425
     */
426
    public function setBirthCity($birthCity = null)
427
    {
428
        // validation for constraint: string
429
        if (!is_null($birthCity) && !is_string($birthCity)) {
0 ignored issues
show
introduced by
The condition is_string($birthCity) is always true.
Loading history...
430
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($birthCity, true), gettype($birthCity)), __LINE__);
431
        }
432
        $this->birthCity = $birthCity;
433
        return $this;
434
    }
435
    /**
436
     * Get nationalIdentificationNumber value
437
     * @return string|null
438
     */
439
    public function getNationalIdentificationNumber()
440
    {
441
        return $this->nationalIdentificationNumber;
442
    }
443
    /**
444
     * Set nationalIdentificationNumber value
445
     * @param string $nationalIdentificationNumber
446
     * @return \Ovh\StructType\NicUpdateIT
447
     */
448
    public function setNationalIdentificationNumber($nationalIdentificationNumber = null)
449
    {
450
        // validation for constraint: string
451
        if (!is_null($nationalIdentificationNumber) && !is_string($nationalIdentificationNumber)) {
0 ignored issues
show
introduced by
The condition is_string($nationalIdentificationNumber) is always true.
Loading history...
452
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($nationalIdentificationNumber, true), gettype($nationalIdentificationNumber)), __LINE__);
453
        }
454
        $this->nationalIdentificationNumber = $nationalIdentificationNumber;
455
        return $this;
456
    }
457
    /**
458
     * Get companyNationalIdentificationNumber value
459
     * @return string|null
460
     */
461
    public function getCompanyNationalIdentificationNumber()
462
    {
463
        return $this->companyNationalIdentificationNumber;
464
    }
465
    /**
466
     * Set companyNationalIdentificationNumber value
467
     * @param string $companyNationalIdentificationNumber
468
     * @return \Ovh\StructType\NicUpdateIT
469
     */
470
    public function setCompanyNationalIdentificationNumber($companyNationalIdentificationNumber = null)
471
    {
472
        // validation for constraint: string
473
        if (!is_null($companyNationalIdentificationNumber) && !is_string($companyNationalIdentificationNumber)) {
0 ignored issues
show
introduced by
The condition is_string($companyNationalIdentificationNumber) is always true.
Loading history...
474
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($companyNationalIdentificationNumber, true), gettype($companyNationalIdentificationNumber)), __LINE__);
475
        }
476
        $this->companyNationalIdentificationNumber = $companyNationalIdentificationNumber;
477
        return $this;
478
    }
479
    /**
480
     * Get corporationType value
481
     * @return string|null
482
     */
483
    public function getCorporationType()
484
    {
485
        return $this->corporationType;
486
    }
487
    /**
488
     * Set corporationType value
489
     * @param string $corporationType
490
     * @return \Ovh\StructType\NicUpdateIT
491
     */
492
    public function setCorporationType($corporationType = null)
493
    {
494
        // validation for constraint: string
495
        if (!is_null($corporationType) && !is_string($corporationType)) {
0 ignored issues
show
introduced by
The condition is_string($corporationType) is always true.
Loading history...
496
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($corporationType, true), gettype($corporationType)), __LINE__);
497
        }
498
        $this->corporationType = $corporationType;
499
        return $this;
500
    }
501
}
502