NicModifyInfos::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

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