MemberReservation::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 0
cts 15
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 13
nc 1
nop 12
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 MemberReservation
6
{
7
8
    /**
9
     * @var string $AccountNo
10
     */
11
    protected $AccountNo = null;
12
13
    /**
14
     * @var int $ID_Member
15
     */
16
    protected $ID_Member = null;
17
18
    /**
19
     * @var string $ResAccountNo
20
     */
21
    protected $ResAccountNo = null;
22
23
    /**
24
     * @var \DateTime $ArrivalDate
25
     */
26
    protected $ArrivalDate = null;
27
28
    /**
29
     * @var \DateTime $DepartureDate
30
     */
31
    protected $DepartureDate = null;
32
33
    /**
34
     * @var string $Discriminator
35
     */
36
    protected $Discriminator = null;
37
38
    /**
39
     * @var string $RoomNo
40
     */
41
    protected $RoomNo = null;
42
43
    /**
44
     * @var string $AccountName
45
     */
46
    protected $AccountName = null;
47
48
    /**
49
     * @var float $TotalSoldeA
50
     */
51
    protected $TotalSoldeA = null;
52
53
    /**
54
     * @var float $TotalSoldeB
55
     */
56
    protected $TotalSoldeB = null;
57
58
    /**
59
     * @var float $TotalSoldeC
60
     */
61
    protected $TotalSoldeC = null;
62
63
    /**
64
     * @var float $TotalSoldeD
65
     */
66
    protected $TotalSoldeD = null;
67
68
    /**
69
     * @var float $TotalSubFolioA
70
     */
71
    protected $TotalSubFolioA = null;
72
73
    /**
74
     * @var float $TotalSubFolioB
75
     */
76
    protected $TotalSubFolioB = null;
77
78
    /**
79
     * @var float $TotalSubFolioC
80
     */
81
    protected $TotalSubFolioC = null;
82
83
    /**
84
     * @var float $TotalSubFolioD
85
     */
86
    protected $TotalSubFolioD = null;
87
88
    /**
89
     * @var float $TotalFolios
90
     */
91
    protected $TotalFolios = null;
92
93
    /**
94
     * @var string $AccountStatus
95
     */
96
    protected $AccountStatus = null;
97
98
    /**
99
     * @param int $ID_Member
100
     * @param \DateTime $ArrivalDate
101
     * @param \DateTime $DepartureDate
102
     * @param float $TotalSoldeA
103
     * @param float $TotalSoldeB
104
     * @param float $TotalSoldeC
105
     * @param float $TotalSoldeD
106
     * @param float $TotalSubFolioA
107
     * @param float $TotalSubFolioB
108
     * @param float $TotalSubFolioC
109
     * @param float $TotalSubFolioD
110
     * @param float $TotalFolios
111
     */
112
    public function __construct($ID_Member, \DateTime $ArrivalDate, \DateTime $DepartureDate, $TotalSoldeA, $TotalSoldeB, $TotalSoldeC, $TotalSoldeD, $TotalSubFolioA, $TotalSubFolioB, $TotalSubFolioC, $TotalSubFolioD, $TotalFolios)
113
    {
114
        $this->ID_Member = $ID_Member;
115
        $this->ArrivalDate = $ArrivalDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $ArrivalDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $ArrivalDate.

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...
116
        $this->DepartureDate = $DepartureDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $DepartureDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $DepartureDate.

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...
117
        $this->TotalSoldeA = $TotalSoldeA;
118
        $this->TotalSoldeB = $TotalSoldeB;
119
        $this->TotalSoldeC = $TotalSoldeC;
120
        $this->TotalSoldeD = $TotalSoldeD;
121
        $this->TotalSubFolioA = $TotalSubFolioA;
122
        $this->TotalSubFolioB = $TotalSubFolioB;
123
        $this->TotalSubFolioC = $TotalSubFolioC;
124
        $this->TotalSubFolioD = $TotalSubFolioD;
125
        $this->TotalFolios = $TotalFolios;
126
    }
127
128
    /**
129
     * @return string
130
     */
131
    public function getAccountNo()
132
    {
133
        return $this->AccountNo;
134
    }
135
136
    /**
137
     * @param string $AccountNo
138
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
139
     */
140
    public function setAccountNo($AccountNo)
141
    {
142
        $this->AccountNo = $AccountNo;
143
        return $this;
144
    }
145
146
    /**
147
     * @return int
148
     */
149
    public function getID_Member()
150
    {
151
        return $this->ID_Member;
152
    }
153
154
    /**
155
     * @param int $ID_Member
156
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
157
     */
158
    public function setID_Member($ID_Member)
159
    {
160
        $this->ID_Member = $ID_Member;
161
        return $this;
162
    }
163
164
    /**
165
     * @return string
166
     */
167
    public function getResAccountNo()
168
    {
169
        return $this->ResAccountNo;
170
    }
171
172
    /**
173
     * @param string $ResAccountNo
174
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
175
     */
176
    public function setResAccountNo($ResAccountNo)
177
    {
178
        $this->ResAccountNo = $ResAccountNo;
179
        return $this;
180
    }
181
182
    /**
183
     * @return \DateTime
184
     */
185
    public function getArrivalDate()
186
    {
187
        if ($this->ArrivalDate == null) {
188
            return null;
189
        } else {
190
            try {
191
                return new \DateTime($this->ArrivalDate);
192
            } catch (\Exception $e) {
193
                return false;
194
            }
195
        }
196
    }
197
198
    /**
199
     * @param \DateTime $ArrivalDate
200
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
201
     */
202
    public function setArrivalDate(\DateTime $ArrivalDate)
203
    {
204
        $this->ArrivalDate = $ArrivalDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $ArrivalDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $ArrivalDate.

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...
205
        return $this;
206
    }
207
208
    /**
209
     * @return \DateTime
210
     */
211
    public function getDepartureDate()
212
    {
213
        if ($this->DepartureDate == null) {
214
            return null;
215
        } else {
216
            try {
217
                return new \DateTime($this->DepartureDate);
218
            } catch (\Exception $e) {
219
                return false;
220
            }
221
        }
222
    }
223
224
    /**
225
     * @param \DateTime $DepartureDate
226
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
227
     */
228
    public function setDepartureDate(\DateTime $DepartureDate)
229
    {
230
        $this->DepartureDate = $DepartureDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $DepartureDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $DepartureDate.

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...
231
        return $this;
232
    }
233
234
    /**
235
     * @return string
236
     */
237
    public function getDiscriminator()
238
    {
239
        return $this->Discriminator;
240
    }
241
242
    /**
243
     * @param string $Discriminator
244
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
245
     */
246
    public function setDiscriminator($Discriminator)
247
    {
248
        $this->Discriminator = $Discriminator;
249
        return $this;
250
    }
251
252
    /**
253
     * @return string
254
     */
255
    public function getRoomNo()
256
    {
257
        return $this->RoomNo;
258
    }
259
260
    /**
261
     * @param string $RoomNo
262
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
263
     */
264
    public function setRoomNo($RoomNo)
265
    {
266
        $this->RoomNo = $RoomNo;
267
        return $this;
268
    }
269
270
    /**
271
     * @return string
272
     */
273
    public function getAccountName()
274
    {
275
        return $this->AccountName;
276
    }
277
278
    /**
279
     * @param string $AccountName
280
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
281
     */
282
    public function setAccountName($AccountName)
283
    {
284
        $this->AccountName = $AccountName;
285
        return $this;
286
    }
287
288
    /**
289
     * @return float
290
     */
291
    public function getTotalSoldeA()
292
    {
293
        return $this->TotalSoldeA;
294
    }
295
296
    /**
297
     * @param float $TotalSoldeA
298
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
299
     */
300
    public function setTotalSoldeA($TotalSoldeA)
301
    {
302
        $this->TotalSoldeA = $TotalSoldeA;
303
        return $this;
304
    }
305
306
    /**
307
     * @return float
308
     */
309
    public function getTotalSoldeB()
310
    {
311
        return $this->TotalSoldeB;
312
    }
313
314
    /**
315
     * @param float $TotalSoldeB
316
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
317
     */
318
    public function setTotalSoldeB($TotalSoldeB)
319
    {
320
        $this->TotalSoldeB = $TotalSoldeB;
321
        return $this;
322
    }
323
324
    /**
325
     * @return float
326
     */
327
    public function getTotalSoldeC()
328
    {
329
        return $this->TotalSoldeC;
330
    }
331
332
    /**
333
     * @param float $TotalSoldeC
334
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
335
     */
336
    public function setTotalSoldeC($TotalSoldeC)
337
    {
338
        $this->TotalSoldeC = $TotalSoldeC;
339
        return $this;
340
    }
341
342
    /**
343
     * @return float
344
     */
345
    public function getTotalSoldeD()
346
    {
347
        return $this->TotalSoldeD;
348
    }
349
350
    /**
351
     * @param float $TotalSoldeD
352
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
353
     */
354
    public function setTotalSoldeD($TotalSoldeD)
355
    {
356
        $this->TotalSoldeD = $TotalSoldeD;
357
        return $this;
358
    }
359
360
    /**
361
     * @return float
362
     */
363
    public function getTotalSubFolioA()
364
    {
365
        return $this->TotalSubFolioA;
366
    }
367
368
    /**
369
     * @param float $TotalSubFolioA
370
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
371
     */
372
    public function setTotalSubFolioA($TotalSubFolioA)
373
    {
374
        $this->TotalSubFolioA = $TotalSubFolioA;
375
        return $this;
376
    }
377
378
    /**
379
     * @return float
380
     */
381
    public function getTotalSubFolioB()
382
    {
383
        return $this->TotalSubFolioB;
384
    }
385
386
    /**
387
     * @param float $TotalSubFolioB
388
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
389
     */
390
    public function setTotalSubFolioB($TotalSubFolioB)
391
    {
392
        $this->TotalSubFolioB = $TotalSubFolioB;
393
        return $this;
394
    }
395
396
    /**
397
     * @return float
398
     */
399
    public function getTotalSubFolioC()
400
    {
401
        return $this->TotalSubFolioC;
402
    }
403
404
    /**
405
     * @param float $TotalSubFolioC
406
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
407
     */
408
    public function setTotalSubFolioC($TotalSubFolioC)
409
    {
410
        $this->TotalSubFolioC = $TotalSubFolioC;
411
        return $this;
412
    }
413
414
    /**
415
     * @return float
416
     */
417
    public function getTotalSubFolioD()
418
    {
419
        return $this->TotalSubFolioD;
420
    }
421
422
    /**
423
     * @param float $TotalSubFolioD
424
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
425
     */
426
    public function setTotalSubFolioD($TotalSubFolioD)
427
    {
428
        $this->TotalSubFolioD = $TotalSubFolioD;
429
        return $this;
430
    }
431
432
    /**
433
     * @return float
434
     */
435
    public function getTotalFolios()
436
    {
437
        return $this->TotalFolios;
438
    }
439
440
    /**
441
     * @param float $TotalFolios
442
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
443
     */
444
    public function setTotalFolios($TotalFolios)
445
    {
446
        $this->TotalFolios = $TotalFolios;
447
        return $this;
448
    }
449
450
    /**
451
     * @return string
452
     */
453
    public function getAccountStatus()
454
    {
455
        return $this->AccountStatus;
456
    }
457
458
    /**
459
     * @param string $AccountStatus
460
     * @return \Gueststream\PMS\IQWare\API\MemberReservation
461
     */
462
    public function setAccountStatus($AccountStatus)
463
    {
464
        $this->AccountStatus = $AccountStatus;
465
        return $this;
466
    }
467
}
468