GetSingleStayValueRBO::__construct()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 28
Code Lines 26

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 28
ccs 0
cts 28
cp 0
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 26
nc 1
nop 25
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 GetSingleStayValueRBO
6
{
7
8
    /**
9
     * @var int $intGUID
10
     */
11
    protected $intGUID = null;
12
13
    /**
14
     * @var string $strISOLanguage
15
     */
16
    protected $strISOLanguage = null;
17
18
    /**
19
     * @var int $intRoomType
20
     */
21
    protected $intRoomType = null;
22
23
    /**
24
     * @var int $intRateID
25
     */
26
    protected $intRateID = null;
27
28
    /**
29
     * @var int $ID_PromoCode
30
     */
31
    protected $ID_PromoCode = null;
32
33
    /**
34
     * @var int $intGuestCount
35
     */
36
    protected $intGuestCount = null;
37
38
    /**
39
     * @var string $strChildren
40
     */
41
    protected $strChildren = null;
42
43
    /**
44
     * @var \DateTime $dArrDate
45
     */
46
    protected $dArrDate = null;
47
48
    /**
49
     * @var \DateTime $dDepDate
50
     */
51
    protected $dDepDate = null;
52
53
    /**
54
     * @var string $strAttributes
55
     */
56
    protected $strAttributes = null;
57
58
    /**
59
     * @var string $strLocations
60
     */
61
    protected $strLocations = null;
62
63
    /**
64
     * @var dstElements $dstElements
65
     */
66
    protected $dstElements = null;
67
68
    /**
69
     * @var int $intRoomQty
70
     */
71
    protected $intRoomQty = null;
72
73
    /**
74
     * @var boolean $IsInsuranceAccepted
75
     */
76
    protected $IsInsuranceAccepted = null;
77
78
    /**
79
     * @var string $strAttributeGroupings
80
     */
81
    protected $strAttributeGroupings = null;
82
83
    /**
84
     * @var string $strLocationsGroupings
85
     */
86
    protected $strLocationsGroupings = null;
87
88
    /**
89
     * @var boolean $isRBO
90
     */
91
    protected $isRBO = null;
92
93
    /**
94
     * @var boolean $MustEvaluateRBO
95
     */
96
    protected $MustEvaluateRBO = null;
97
98
    /**
99
     * @var string $StrListSpecialOffertApplicable
100
     */
101
    protected $StrListSpecialOffertApplicable = null;
102
103
    /**
104
     * @var XMLDailyManualRates $XMLDailyManualRates
105
     */
106
    protected $XMLDailyManualRates = null;
107
108
    /**
109
     * @var string $XMLDailyRates
110
     */
111
    protected $XMLDailyRates = null;
112
113
    /**
114
     * @var string $XMLServicesChargesALaCarte
115
     */
116
    protected $XMLServicesChargesALaCarte = null;
117
118
    /**
119
     * @var int $ID_Room
120
     */
121
    protected $ID_Room = null;
122
123
    /**
124
     * @var int $ID_Building
125
     */
126
    protected $ID_Building = null;
127
128
    /**
129
     * @var int $intBusinessSourceID
130
     */
131
    protected $intBusinessSourceID = null;
132
133
    /**
134
     * @param int $intGUID
135
     * @param string $strISOLanguage
136
     * @param int $intRoomType
137
     * @param int $intRateID
138
     * @param int $ID_PromoCode
139
     * @param int $intGuestCount
140
     * @param string $strChildren
141
     * @param \DateTime $dArrDate
142
     * @param \DateTime $dDepDate
143
     * @param string $strAttributes
144
     * @param string $strLocations
145
     * @param dstElements $dstElements
146
     * @param int $intRoomQty
147
     * @param boolean $IsInsuranceAccepted
148
     * @param string $strAttributeGroupings
149
     * @param string $strLocationsGroupings
150
     * @param boolean $isRBO
151
     * @param boolean $MustEvaluateRBO
152
     * @param string $StrListSpecialOffertApplicable
153
     * @param XMLDailyManualRates $XMLDailyManualRates
154
     * @param string $XMLDailyRates
155
     * @param string $XMLServicesChargesALaCarte
156
     * @param int $ID_Room
157
     * @param int $ID_Building
158
     * @param int $intBusinessSourceID
159
     */
160
    public function __construct($intGUID, $strISOLanguage, $intRoomType, $intRateID, $ID_PromoCode, $intGuestCount, $strChildren, \DateTime $dArrDate, \DateTime $dDepDate, $strAttributes, $strLocations, $dstElements, $intRoomQty, $IsInsuranceAccepted, $strAttributeGroupings, $strLocationsGroupings, $isRBO, $MustEvaluateRBO, $StrListSpecialOffertApplicable, $XMLDailyManualRates, $XMLDailyRates, $XMLServicesChargesALaCarte, $ID_Room, $ID_Building, $intBusinessSourceID)
161
    {
162
        $this->intGUID = $intGUID;
163
        $this->strISOLanguage = $strISOLanguage;
164
        $this->intRoomType = $intRoomType;
165
        $this->intRateID = $intRateID;
166
        $this->ID_PromoCode = $ID_PromoCode;
167
        $this->intGuestCount = $intGuestCount;
168
        $this->strChildren = $strChildren;
169
        $this->dArrDate = $dArrDate->format('Y-m-d');
0 ignored issues
show
Documentation Bug introduced by
It seems like $dArrDate->format('Y-m-d') of type string is incompatible with the declared type object<DateTime> of property $dArrDate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
170
        $this->dDepDate = $dDepDate->format('Y-m-d');
0 ignored issues
show
Documentation Bug introduced by
It seems like $dDepDate->format('Y-m-d') of type string is incompatible with the declared type object<DateTime> of property $dDepDate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
171
        $this->strAttributes = $strAttributes;
172
        $this->strLocations = $strLocations;
173
        $this->dstElements = $dstElements;
174
        $this->intRoomQty = $intRoomQty;
175
        $this->IsInsuranceAccepted = $IsInsuranceAccepted;
176
        $this->strAttributeGroupings = $strAttributeGroupings;
177
        $this->strLocationsGroupings = $strLocationsGroupings;
178
        $this->isRBO = $isRBO;
179
        $this->MustEvaluateRBO = $MustEvaluateRBO;
180
        $this->StrListSpecialOffertApplicable = $StrListSpecialOffertApplicable;
181
        $this->XMLDailyManualRates = $XMLDailyManualRates;
182
        $this->XMLDailyRates = $XMLDailyRates;
183
        $this->XMLServicesChargesALaCarte = $XMLServicesChargesALaCarte;
184
        $this->ID_Room = $ID_Room;
185
        $this->ID_Building = $ID_Building;
186
        $this->intBusinessSourceID = $intBusinessSourceID;
187
    }
188
189
    /**
190
     * @return int
191
     */
192
    public function getIntGUID()
193
    {
194
        return $this->intGUID;
195
    }
196
197
    /**
198
     * @param int $intGUID
199
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
200
     */
201
    public function setIntGUID($intGUID)
202
    {
203
        $this->intGUID = $intGUID;
204
        return $this;
205
    }
206
207
    /**
208
     * @return string
209
     */
210
    public function getStrISOLanguage()
211
    {
212
        return $this->strISOLanguage;
213
    }
214
215
    /**
216
     * @param string $strISOLanguage
217
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
218
     */
219
    public function setStrISOLanguage($strISOLanguage)
220
    {
221
        $this->strISOLanguage = $strISOLanguage;
222
        return $this;
223
    }
224
225
    /**
226
     * @return int
227
     */
228
    public function getIntRoomType()
229
    {
230
        return $this->intRoomType;
231
    }
232
233
    /**
234
     * @param int $intRoomType
235
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
236
     */
237
    public function setIntRoomType($intRoomType)
238
    {
239
        $this->intRoomType = $intRoomType;
240
        return $this;
241
    }
242
243
    /**
244
     * @return int
245
     */
246
    public function getIntRateID()
247
    {
248
        return $this->intRateID;
249
    }
250
251
    /**
252
     * @param int $intRateID
253
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
254
     */
255
    public function setIntRateID($intRateID)
256
    {
257
        $this->intRateID = $intRateID;
258
        return $this;
259
    }
260
261
    /**
262
     * @return int
263
     */
264
    public function getID_PromoCode()
265
    {
266
        return $this->ID_PromoCode;
267
    }
268
269
    /**
270
     * @param int $ID_PromoCode
271
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
272
     */
273
    public function setID_PromoCode($ID_PromoCode)
274
    {
275
        $this->ID_PromoCode = $ID_PromoCode;
276
        return $this;
277
    }
278
279
    /**
280
     * @return int
281
     */
282
    public function getIntGuestCount()
283
    {
284
        return $this->intGuestCount;
285
    }
286
287
    /**
288
     * @param int $intGuestCount
289
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
290
     */
291
    public function setIntGuestCount($intGuestCount)
292
    {
293
        $this->intGuestCount = $intGuestCount;
294
        return $this;
295
    }
296
297
    /**
298
     * @return string
299
     */
300
    public function getStrChildren()
301
    {
302
        return $this->strChildren;
303
    }
304
305
    /**
306
     * @param string $strChildren
307
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
308
     */
309
    public function setStrChildren($strChildren)
310
    {
311
        $this->strChildren = $strChildren;
312
        return $this;
313
    }
314
315
    /**
316
     * @return \DateTime
317
     */
318
    public function getDArrDate()
319
    {
320
        if ($this->dArrDate == null) {
321
            return null;
322
        } else {
323
            try {
324
                return new \DateTime($this->dArrDate);
325
            } catch (\Exception $e) {
326
                return false;
327
            }
328
        }
329
    }
330
331
    /**
332
     * @param \DateTime $dArrDate
333
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
334
     */
335
    public function setDArrDate(\DateTime $dArrDate)
336
    {
337
        $this->dArrDate = $dArrDate->format('Y-m-d');
0 ignored issues
show
Documentation Bug introduced by
It seems like $dArrDate->format('Y-m-d') of type string is incompatible with the declared type object<DateTime> of property $dArrDate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
338
        return $this;
339
    }
340
341
    /**
342
     * @return \DateTime
343
     */
344
    public function getDDepDate()
345
    {
346
        if ($this->dDepDate == null) {
347
            return null;
348
        } else {
349
            try {
350
                return new \DateTime($this->dDepDate);
351
            } catch (\Exception $e) {
352
                return false;
353
            }
354
        }
355
    }
356
357
    /**
358
     * @param \DateTime $dDepDate
359
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
360
     */
361
    public function setDDepDate(\DateTime $dDepDate)
362
    {
363
        $this->dDepDate = $dDepDate->format('Y-m-d');
0 ignored issues
show
Documentation Bug introduced by
It seems like $dDepDate->format('Y-m-d') of type string is incompatible with the declared type object<DateTime> of property $dDepDate.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
364
        return $this;
365
    }
366
367
    /**
368
     * @return string
369
     */
370
    public function getStrAttributes()
371
    {
372
        return $this->strAttributes;
373
    }
374
375
    /**
376
     * @param string $strAttributes
377
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
378
     */
379
    public function setStrAttributes($strAttributes)
380
    {
381
        $this->strAttributes = $strAttributes;
382
        return $this;
383
    }
384
385
    /**
386
     * @return string
387
     */
388
    public function getStrLocations()
389
    {
390
        return $this->strLocations;
391
    }
392
393
    /**
394
     * @param string $strLocations
395
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
396
     */
397
    public function setStrLocations($strLocations)
398
    {
399
        $this->strLocations = $strLocations;
400
        return $this;
401
    }
402
403
    /**
404
     * @return dstElements
405
     */
406
    public function getDstElements()
407
    {
408
        return $this->dstElements;
409
    }
410
411
    /**
412
     * @param dstElements $dstElements
413
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
414
     */
415
    public function setDstElements($dstElements)
416
    {
417
        $this->dstElements = $dstElements;
418
        return $this;
419
    }
420
421
    /**
422
     * @return int
423
     */
424
    public function getIntRoomQty()
425
    {
426
        return $this->intRoomQty;
427
    }
428
429
    /**
430
     * @param int $intRoomQty
431
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
432
     */
433
    public function setIntRoomQty($intRoomQty)
434
    {
435
        $this->intRoomQty = $intRoomQty;
436
        return $this;
437
    }
438
439
    /**
440
     * @return boolean
441
     */
442
    public function getIsInsuranceAccepted()
443
    {
444
        return $this->IsInsuranceAccepted;
445
    }
446
447
    /**
448
     * @param boolean $IsInsuranceAccepted
449
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
450
     */
451
    public function setIsInsuranceAccepted($IsInsuranceAccepted)
452
    {
453
        $this->IsInsuranceAccepted = $IsInsuranceAccepted;
454
        return $this;
455
    }
456
457
    /**
458
     * @return string
459
     */
460
    public function getStrAttributeGroupings()
461
    {
462
        return $this->strAttributeGroupings;
463
    }
464
465
    /**
466
     * @param string $strAttributeGroupings
467
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
468
     */
469
    public function setStrAttributeGroupings($strAttributeGroupings)
470
    {
471
        $this->strAttributeGroupings = $strAttributeGroupings;
472
        return $this;
473
    }
474
475
    /**
476
     * @return string
477
     */
478
    public function getStrLocationsGroupings()
479
    {
480
        return $this->strLocationsGroupings;
481
    }
482
483
    /**
484
     * @param string $strLocationsGroupings
485
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
486
     */
487
    public function setStrLocationsGroupings($strLocationsGroupings)
488
    {
489
        $this->strLocationsGroupings = $strLocationsGroupings;
490
        return $this;
491
    }
492
493
    /**
494
     * @return boolean
495
     */
496
    public function getIsRBO()
497
    {
498
        return $this->isRBO;
499
    }
500
501
    /**
502
     * @param boolean $isRBO
503
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
504
     */
505
    public function setIsRBO($isRBO)
506
    {
507
        $this->isRBO = $isRBO;
508
        return $this;
509
    }
510
511
    /**
512
     * @return boolean
513
     */
514
    public function getMustEvaluateRBO()
515
    {
516
        return $this->MustEvaluateRBO;
517
    }
518
519
    /**
520
     * @param boolean $MustEvaluateRBO
521
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
522
     */
523
    public function setMustEvaluateRBO($MustEvaluateRBO)
524
    {
525
        $this->MustEvaluateRBO = $MustEvaluateRBO;
526
        return $this;
527
    }
528
529
    /**
530
     * @return string
531
     */
532
    public function getStrListSpecialOffertApplicable()
533
    {
534
        return $this->StrListSpecialOffertApplicable;
535
    }
536
537
    /**
538
     * @param string $StrListSpecialOffertApplicable
539
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
540
     */
541
    public function setStrListSpecialOffertApplicable($StrListSpecialOffertApplicable)
542
    {
543
        $this->StrListSpecialOffertApplicable = $StrListSpecialOffertApplicable;
544
        return $this;
545
    }
546
547
    /**
548
     * @return XMLDailyManualRates
549
     */
550
    public function getXMLDailyManualRates()
551
    {
552
        return $this->XMLDailyManualRates;
553
    }
554
555
    /**
556
     * @param XMLDailyManualRates $XMLDailyManualRates
557
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
558
     */
559
    public function setXMLDailyManualRates($XMLDailyManualRates)
560
    {
561
        $this->XMLDailyManualRates = $XMLDailyManualRates;
562
        return $this;
563
    }
564
565
    /**
566
     * @return string
567
     */
568
    public function getXMLDailyRates()
569
    {
570
        return $this->XMLDailyRates;
571
    }
572
573
    /**
574
     * @param string $XMLDailyRates
575
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
576
     */
577
    public function setXMLDailyRates($XMLDailyRates)
578
    {
579
        $this->XMLDailyRates = $XMLDailyRates;
580
        return $this;
581
    }
582
583
    /**
584
     * @return string
585
     */
586
    public function getXMLServicesChargesALaCarte()
587
    {
588
        return $this->XMLServicesChargesALaCarte;
589
    }
590
591
    /**
592
     * @param string $XMLServicesChargesALaCarte
593
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
594
     */
595
    public function setXMLServicesChargesALaCarte($XMLServicesChargesALaCarte)
596
    {
597
        $this->XMLServicesChargesALaCarte = $XMLServicesChargesALaCarte;
598
        return $this;
599
    }
600
601
    /**
602
     * @return int
603
     */
604
    public function getID_Room()
605
    {
606
        return $this->ID_Room;
607
    }
608
609
    /**
610
     * @param int $ID_Room
611
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
612
     */
613
    public function setID_Room($ID_Room)
614
    {
615
        $this->ID_Room = $ID_Room;
616
        return $this;
617
    }
618
619
    /**
620
     * @return int
621
     */
622
    public function getID_Building()
623
    {
624
        return $this->ID_Building;
625
    }
626
627
    /**
628
     * @param int $ID_Building
629
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
630
     */
631
    public function setID_Building($ID_Building)
632
    {
633
        $this->ID_Building = $ID_Building;
634
        return $this;
635
    }
636
637
    /**
638
     * @return int
639
     */
640
    public function getIntBusinessSourceID()
641
    {
642
        return $this->intBusinessSourceID;
643
    }
644
645
    /**
646
     * @param int $intBusinessSourceID
647
     * @return \Gueststream\PMS\IQWare\API\GetSingleStayValueRBO
648
     */
649
    public function setIntBusinessSourceID($intBusinessSourceID)
650
    {
651
        $this->intBusinessSourceID = $intBusinessSourceID;
652
        return $this;
653
    }
654
}
655