TravelAgent::__construct()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 29
Code Lines 27

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 29
ccs 0
cts 29
cp 0
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 27
nc 1
nop 26
crap 2

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 Gueststream\PMS\IQWare\API;
4
5
class TravelAgent
6
{
7
8
    /**
9
     * @var int $AccountNo
10
     */
11
    protected $AccountNo = null;
12
13
    /**
14
     * @var int $AccountID
15
     */
16
    protected $AccountID = null;
17
18
    /**
19
     * @var string $IATANo
20
     */
21
    protected $IATANo = null;
22
23
    /**
24
     * @var boolean $IsPayable
25
     */
26
    protected $IsPayable = null;
27
28
    /**
29
     * @var int $CurrencyID
30
     */
31
    protected $CurrencyID = null;
32
33
    /**
34
     * @var int $AgentType
35
     */
36
    protected $AgentType = null;
37
38
    /**
39
     * @var int $SAStatus
40
     */
41
    protected $SAStatus = null;
42
43
    /**
44
     * @var int $AddressID
45
     */
46
    protected $AddressID = null;
47
48
    /**
49
     * @var string $AccountName
50
     */
51
    protected $AccountName = null;
52
53
    /**
54
     * @var float $TotalCommNotApproved
55
     */
56
    protected $TotalCommNotApproved = null;
57
58
    /**
59
     * @var float $TotalCommNotPaid
60
     */
61
    protected $TotalCommNotPaid = null;
62
63
    /**
64
     * @var float $CheckNotReconcile
65
     */
66
    protected $CheckNotReconcile = null;
67
68
    /**
69
     * @var int $AccountAcceptedCurrencyType
70
     */
71
    protected $AccountAcceptedCurrencyType = null;
72
73
    /**
74
     * @var int $PaymentMode1
75
     */
76
    protected $PaymentMode1 = null;
77
78
    /**
79
     * @var float $Mode1PctCommRate
80
     */
81
    protected $Mode1PctCommRate = null;
82
83
    /**
84
     * @var float $Mode1FixCommRate
85
     */
86
    protected $Mode1FixCommRate = null;
87
88
    /**
89
     * @var float $Mode1AddPersonRate
90
     */
91
    protected $Mode1AddPersonRate = null;
92
93
    /**
94
     * @var int $PaymentMode2
95
     */
96
    protected $PaymentMode2 = null;
97
98
    /**
99
     * @var float $Mode2PctCommRate
100
     */
101
    protected $Mode2PctCommRate = null;
102
103
    /**
104
     * @var float $Mode2FixCommRate
105
     */
106
    protected $Mode2FixCommRate = null;
107
108
    /**
109
     * @var float $Mode2AddPersonRate
110
     */
111
    protected $Mode2AddPersonRate = null;
112
113
    /**
114
     * @var Reservations $Reservations
115
     */
116
    protected $Reservations = null;
117
118
    /**
119
     * @var Comissions $Comissions
120
     */
121
    protected $Comissions = null;
122
123
    /**
124
     * @var Address $Address
125
     */
126
    protected $Address = null;
127
128
    /**
129
     * @var Balances $Balances
130
     */
131
    protected $Balances = null;
132
133
    /**
134
     * @var Telephones $Telephones
135
     */
136
    protected $Telephones = null;
137
138
    /**
139
     * @param int $AccountNo
140
     * @param int $AccountID
141
     * @param string $IATANo
142
     * @param boolean $IsPayable
143
     * @param int $CurrencyID
144
     * @param int $AgentType
145
     * @param int $SAStatus
146
     * @param int $AddressID
147
     * @param string $AccountName
148
     * @param float $TotalCommNotApproved
149
     * @param float $TotalCommNotPaid
150
     * @param float $CheckNotReconcile
151
     * @param int $AccountAcceptedCurrencyType
152
     * @param int $PaymentMode1
153
     * @param float $Mode1PctCommRate
154
     * @param float $Mode1FixCommRate
155
     * @param float $Mode1AddPersonRate
156
     * @param int $PaymentMode2
157
     * @param float $Mode2PctCommRate
158
     * @param float $Mode2FixCommRate
159
     * @param float $Mode2AddPersonRate
160
     * @param Reservations $Reservations
161
     * @param Comissions $Comissions
162
     * @param Address $Address
163
     * @param Balances $Balances
164
     * @param Telephones $Telephones
165
     */
166
    public function __construct($AccountNo, $AccountID, $IATANo, $IsPayable, $CurrencyID, $AgentType, $SAStatus, $AddressID, $AccountName, $TotalCommNotApproved, $TotalCommNotPaid, $CheckNotReconcile, $AccountAcceptedCurrencyType, $PaymentMode1, $Mode1PctCommRate, $Mode1FixCommRate, $Mode1AddPersonRate, $PaymentMode2, $Mode2PctCommRate, $Mode2FixCommRate, $Mode2AddPersonRate, $Reservations, $Comissions, $Address, $Balances, $Telephones)
167
    {
168
        $this->AccountNo = $AccountNo;
169
        $this->AccountID = $AccountID;
170
        $this->IATANo = $IATANo;
171
        $this->IsPayable = $IsPayable;
172
        $this->CurrencyID = $CurrencyID;
173
        $this->AgentType = $AgentType;
174
        $this->SAStatus = $SAStatus;
175
        $this->AddressID = $AddressID;
176
        $this->AccountName = $AccountName;
177
        $this->TotalCommNotApproved = $TotalCommNotApproved;
178
        $this->TotalCommNotPaid = $TotalCommNotPaid;
179
        $this->CheckNotReconcile = $CheckNotReconcile;
180
        $this->AccountAcceptedCurrencyType = $AccountAcceptedCurrencyType;
181
        $this->PaymentMode1 = $PaymentMode1;
182
        $this->Mode1PctCommRate = $Mode1PctCommRate;
183
        $this->Mode1FixCommRate = $Mode1FixCommRate;
184
        $this->Mode1AddPersonRate = $Mode1AddPersonRate;
185
        $this->PaymentMode2 = $PaymentMode2;
186
        $this->Mode2PctCommRate = $Mode2PctCommRate;
187
        $this->Mode2FixCommRate = $Mode2FixCommRate;
188
        $this->Mode2AddPersonRate = $Mode2AddPersonRate;
189
        $this->Reservations = $Reservations;
190
        $this->Comissions = $Comissions;
191
        $this->Address = $Address;
192
        $this->Balances = $Balances;
193
        $this->Telephones = $Telephones;
194
    }
195
196
    /**
197
     * @return int
198
     */
199
    public function getAccountNo()
200
    {
201
        return $this->AccountNo;
202
    }
203
204
    /**
205
     * @param int $AccountNo
206
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
207
     */
208
    public function setAccountNo($AccountNo)
209
    {
210
        $this->AccountNo = $AccountNo;
211
        return $this;
212
    }
213
214
    /**
215
     * @return int
216
     */
217
    public function getAccountID()
218
    {
219
        return $this->AccountID;
220
    }
221
222
    /**
223
     * @param int $AccountID
224
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
225
     */
226
    public function setAccountID($AccountID)
227
    {
228
        $this->AccountID = $AccountID;
229
        return $this;
230
    }
231
232
    /**
233
     * @return string
234
     */
235
    public function getIATANo()
236
    {
237
        return $this->IATANo;
238
    }
239
240
    /**
241
     * @param string $IATANo
242
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
243
     */
244
    public function setIATANo($IATANo)
245
    {
246
        $this->IATANo = $IATANo;
247
        return $this;
248
    }
249
250
    /**
251
     * @return boolean
252
     */
253
    public function getIsPayable()
254
    {
255
        return $this->IsPayable;
256
    }
257
258
    /**
259
     * @param boolean $IsPayable
260
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
261
     */
262
    public function setIsPayable($IsPayable)
263
    {
264
        $this->IsPayable = $IsPayable;
265
        return $this;
266
    }
267
268
    /**
269
     * @return int
270
     */
271
    public function getCurrencyID()
272
    {
273
        return $this->CurrencyID;
274
    }
275
276
    /**
277
     * @param int $CurrencyID
278
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
279
     */
280
    public function setCurrencyID($CurrencyID)
281
    {
282
        $this->CurrencyID = $CurrencyID;
283
        return $this;
284
    }
285
286
    /**
287
     * @return int
288
     */
289
    public function getAgentType()
290
    {
291
        return $this->AgentType;
292
    }
293
294
    /**
295
     * @param int $AgentType
296
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
297
     */
298
    public function setAgentType($AgentType)
299
    {
300
        $this->AgentType = $AgentType;
301
        return $this;
302
    }
303
304
    /**
305
     * @return int
306
     */
307
    public function getSAStatus()
308
    {
309
        return $this->SAStatus;
310
    }
311
312
    /**
313
     * @param int $SAStatus
314
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
315
     */
316
    public function setSAStatus($SAStatus)
317
    {
318
        $this->SAStatus = $SAStatus;
319
        return $this;
320
    }
321
322
    /**
323
     * @return int
324
     */
325
    public function getAddressID()
326
    {
327
        return $this->AddressID;
328
    }
329
330
    /**
331
     * @param int $AddressID
332
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
333
     */
334
    public function setAddressID($AddressID)
335
    {
336
        $this->AddressID = $AddressID;
337
        return $this;
338
    }
339
340
    /**
341
     * @return string
342
     */
343
    public function getAccountName()
344
    {
345
        return $this->AccountName;
346
    }
347
348
    /**
349
     * @param string $AccountName
350
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
351
     */
352
    public function setAccountName($AccountName)
353
    {
354
        $this->AccountName = $AccountName;
355
        return $this;
356
    }
357
358
    /**
359
     * @return float
360
     */
361
    public function getTotalCommNotApproved()
362
    {
363
        return $this->TotalCommNotApproved;
364
    }
365
366
    /**
367
     * @param float $TotalCommNotApproved
368
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
369
     */
370
    public function setTotalCommNotApproved($TotalCommNotApproved)
371
    {
372
        $this->TotalCommNotApproved = $TotalCommNotApproved;
373
        return $this;
374
    }
375
376
    /**
377
     * @return float
378
     */
379
    public function getTotalCommNotPaid()
380
    {
381
        return $this->TotalCommNotPaid;
382
    }
383
384
    /**
385
     * @param float $TotalCommNotPaid
386
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
387
     */
388
    public function setTotalCommNotPaid($TotalCommNotPaid)
389
    {
390
        $this->TotalCommNotPaid = $TotalCommNotPaid;
391
        return $this;
392
    }
393
394
    /**
395
     * @return float
396
     */
397
    public function getCheckNotReconcile()
398
    {
399
        return $this->CheckNotReconcile;
400
    }
401
402
    /**
403
     * @param float $CheckNotReconcile
404
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
405
     */
406
    public function setCheckNotReconcile($CheckNotReconcile)
407
    {
408
        $this->CheckNotReconcile = $CheckNotReconcile;
409
        return $this;
410
    }
411
412
    /**
413
     * @return int
414
     */
415
    public function getAccountAcceptedCurrencyType()
416
    {
417
        return $this->AccountAcceptedCurrencyType;
418
    }
419
420
    /**
421
     * @param int $AccountAcceptedCurrencyType
422
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
423
     */
424
    public function setAccountAcceptedCurrencyType($AccountAcceptedCurrencyType)
425
    {
426
        $this->AccountAcceptedCurrencyType = $AccountAcceptedCurrencyType;
427
        return $this;
428
    }
429
430
    /**
431
     * @return int
432
     */
433
    public function getPaymentMode1()
434
    {
435
        return $this->PaymentMode1;
436
    }
437
438
    /**
439
     * @param int $PaymentMode1
440
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
441
     */
442
    public function setPaymentMode1($PaymentMode1)
443
    {
444
        $this->PaymentMode1 = $PaymentMode1;
445
        return $this;
446
    }
447
448
    /**
449
     * @return float
450
     */
451
    public function getMode1PctCommRate()
452
    {
453
        return $this->Mode1PctCommRate;
454
    }
455
456
    /**
457
     * @param float $Mode1PctCommRate
458
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
459
     */
460
    public function setMode1PctCommRate($Mode1PctCommRate)
461
    {
462
        $this->Mode1PctCommRate = $Mode1PctCommRate;
463
        return $this;
464
    }
465
466
    /**
467
     * @return float
468
     */
469
    public function getMode1FixCommRate()
470
    {
471
        return $this->Mode1FixCommRate;
472
    }
473
474
    /**
475
     * @param float $Mode1FixCommRate
476
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
477
     */
478
    public function setMode1FixCommRate($Mode1FixCommRate)
479
    {
480
        $this->Mode1FixCommRate = $Mode1FixCommRate;
481
        return $this;
482
    }
483
484
    /**
485
     * @return float
486
     */
487
    public function getMode1AddPersonRate()
488
    {
489
        return $this->Mode1AddPersonRate;
490
    }
491
492
    /**
493
     * @param float $Mode1AddPersonRate
494
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
495
     */
496
    public function setMode1AddPersonRate($Mode1AddPersonRate)
497
    {
498
        $this->Mode1AddPersonRate = $Mode1AddPersonRate;
499
        return $this;
500
    }
501
502
    /**
503
     * @return int
504
     */
505
    public function getPaymentMode2()
506
    {
507
        return $this->PaymentMode2;
508
    }
509
510
    /**
511
     * @param int $PaymentMode2
512
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
513
     */
514
    public function setPaymentMode2($PaymentMode2)
515
    {
516
        $this->PaymentMode2 = $PaymentMode2;
517
        return $this;
518
    }
519
520
    /**
521
     * @return float
522
     */
523
    public function getMode2PctCommRate()
524
    {
525
        return $this->Mode2PctCommRate;
526
    }
527
528
    /**
529
     * @param float $Mode2PctCommRate
530
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
531
     */
532
    public function setMode2PctCommRate($Mode2PctCommRate)
533
    {
534
        $this->Mode2PctCommRate = $Mode2PctCommRate;
535
        return $this;
536
    }
537
538
    /**
539
     * @return float
540
     */
541
    public function getMode2FixCommRate()
542
    {
543
        return $this->Mode2FixCommRate;
544
    }
545
546
    /**
547
     * @param float $Mode2FixCommRate
548
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
549
     */
550
    public function setMode2FixCommRate($Mode2FixCommRate)
551
    {
552
        $this->Mode2FixCommRate = $Mode2FixCommRate;
553
        return $this;
554
    }
555
556
    /**
557
     * @return float
558
     */
559
    public function getMode2AddPersonRate()
560
    {
561
        return $this->Mode2AddPersonRate;
562
    }
563
564
    /**
565
     * @param float $Mode2AddPersonRate
566
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
567
     */
568
    public function setMode2AddPersonRate($Mode2AddPersonRate)
569
    {
570
        $this->Mode2AddPersonRate = $Mode2AddPersonRate;
571
        return $this;
572
    }
573
574
    /**
575
     * @return Reservations
576
     */
577
    public function getReservations()
578
    {
579
        return $this->Reservations;
580
    }
581
582
    /**
583
     * @param Reservations $Reservations
584
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
585
     */
586
    public function setReservations($Reservations)
587
    {
588
        $this->Reservations = $Reservations;
589
        return $this;
590
    }
591
592
    /**
593
     * @return Comissions
594
     */
595
    public function getComissions()
596
    {
597
        return $this->Comissions;
598
    }
599
600
    /**
601
     * @param Comissions $Comissions
602
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
603
     */
604
    public function setComissions($Comissions)
605
    {
606
        $this->Comissions = $Comissions;
607
        return $this;
608
    }
609
610
    /**
611
     * @return Address
612
     */
613
    public function getAddress()
614
    {
615
        return $this->Address;
616
    }
617
618
    /**
619
     * @param Address $Address
620
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
621
     */
622
    public function setAddress($Address)
623
    {
624
        $this->Address = $Address;
625
        return $this;
626
    }
627
628
    /**
629
     * @return Balances
630
     */
631
    public function getBalances()
632
    {
633
        return $this->Balances;
634
    }
635
636
    /**
637
     * @param Balances $Balances
638
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
639
     */
640
    public function setBalances($Balances)
641
    {
642
        $this->Balances = $Balances;
643
        return $this;
644
    }
645
646
    /**
647
     * @return Telephones
648
     */
649
    public function getTelephones()
650
    {
651
        return $this->Telephones;
652
    }
653
654
    /**
655
     * @param Telephones $Telephones
656
     * @return \Gueststream\PMS\IQWare\API\TravelAgent
657
     */
658
    public function setTelephones($Telephones)
659
    {
660
        $this->Telephones = $Telephones;
661
        return $this;
662
    }
663
}
664