dtHotelInfos::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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

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...
113
        $this->Phone800 = $Phone800;
114
        $this->ID_Language = $ID_Language;
115
        $this->IsFranchise = $IsFranchise;
116
        $this->IsAr = $IsAr;
117
    }
118
119
    /**
120
     * @return int
121
     */
122
    public function getID_Property()
123
    {
124
        return $this->ID_Property;
125
    }
126
127
    /**
128
     * @param int $ID_Property
129
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
130
     */
131
    public function setID_Property($ID_Property)
132
    {
133
        $this->ID_Property = $ID_Property;
134
        return $this;
135
    }
136
137
    /**
138
     * @return int
139
     */
140
    public function getID_Currency()
141
    {
142
        return $this->ID_Currency;
143
    }
144
145
    /**
146
     * @param int $ID_Currency
147
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
148
     */
149
    public function setID_Currency($ID_Currency)
150
    {
151
        $this->ID_Currency = $ID_Currency;
152
        return $this;
153
    }
154
155
    /**
156
     * @return string
157
     */
158
    public function getHotelName()
159
    {
160
        return $this->HotelName;
161
    }
162
163
    /**
164
     * @param string $HotelName
165
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
166
     */
167
    public function setHotelName($HotelName)
168
    {
169
        $this->HotelName = $HotelName;
170
        return $this;
171
    }
172
173
    /**
174
     * @return string
175
     */
176
    public function getAddress()
177
    {
178
        return $this->Address;
179
    }
180
181
    /**
182
     * @param string $Address
183
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
184
     */
185
    public function setAddress($Address)
186
    {
187
        $this->Address = $Address;
188
        return $this;
189
    }
190
191
    /**
192
     * @return string
193
     */
194
    public function getState()
195
    {
196
        return $this->State;
197
    }
198
199
    /**
200
     * @param string $State
201
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
202
     */
203
    public function setState($State)
204
    {
205
        $this->State = $State;
206
        return $this;
207
    }
208
209
    /**
210
     * @return string
211
     */
212
    public function getCountry()
213
    {
214
        return $this->Country;
215
    }
216
217
    /**
218
     * @param string $Country
219
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
220
     */
221
    public function setCountry($Country)
222
    {
223
        $this->Country = $Country;
224
        return $this;
225
    }
226
227
    /**
228
     * @return string
229
     */
230
    public function getCity()
231
    {
232
        return $this->City;
233
    }
234
235
    /**
236
     * @param string $City
237
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
238
     */
239
    public function setCity($City)
240
    {
241
        $this->City = $City;
242
        return $this;
243
    }
244
245
    /**
246
     * @return string
247
     */
248
    public function getPhone()
249
    {
250
        return $this->Phone;
251
    }
252
253
    /**
254
     * @param string $Phone
255
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
256
     */
257
    public function setPhone($Phone)
258
    {
259
        $this->Phone = $Phone;
260
        return $this;
261
    }
262
263
    /**
264
     * @return string
265
     */
266
    public function getEmail()
267
    {
268
        return $this->Email;
269
    }
270
271
    /**
272
     * @param string $Email
273
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
274
     */
275
    public function setEmail($Email)
276
    {
277
        $this->Email = $Email;
278
        return $this;
279
    }
280
281
    /**
282
     * @return string
283
     */
284
    public function getCurrencySymbol()
285
    {
286
        return $this->CurrencySymbol;
287
    }
288
289
    /**
290
     * @param string $CurrencySymbol
291
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
292
     */
293
    public function setCurrencySymbol($CurrencySymbol)
294
    {
295
        $this->CurrencySymbol = $CurrencySymbol;
296
        return $this;
297
    }
298
299
    /**
300
     * @return \DateTime
301
     */
302
    public function getCurrentHotelDate()
303
    {
304
        if ($this->CurrentHotelDate == null) {
305
            return null;
306
        } else {
307
            try {
308
                return new \DateTime($this->CurrentHotelDate);
309
            } catch (\Exception $e) {
310
                return false;
311
            }
312
        }
313
    }
314
315
    /**
316
     * @param \DateTime $CurrentHotelDate
317
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
318
     */
319
    public function setCurrentHotelDate(\DateTime $CurrentHotelDate)
320
    {
321
        $this->CurrentHotelDate = $CurrentHotelDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $CurrentHotelDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $CurrentHotelDate.

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...
322
        return $this;
323
    }
324
325
    /**
326
     * @return string
327
     */
328
    public function getPhone800()
329
    {
330
        return $this->Phone800;
331
    }
332
333
    /**
334
     * @param string $Phone800
335
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
336
     */
337
    public function setPhone800($Phone800)
338
    {
339
        $this->Phone800 = $Phone800;
340
        return $this;
341
    }
342
343
    /**
344
     * @return int
345
     */
346
    public function getID_Language()
347
    {
348
        return $this->ID_Language;
349
    }
350
351
    /**
352
     * @param int $ID_Language
353
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
354
     */
355
    public function setID_Language($ID_Language)
356
    {
357
        $this->ID_Language = $ID_Language;
358
        return $this;
359
    }
360
361
    /**
362
     * @return boolean
363
     */
364
    public function getIsFranchise()
365
    {
366
        return $this->IsFranchise;
367
    }
368
369
    /**
370
     * @param boolean $IsFranchise
371
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
372
     */
373
    public function setIsFranchise($IsFranchise)
374
    {
375
        $this->IsFranchise = $IsFranchise;
376
        return $this;
377
    }
378
379
    /**
380
     * @return boolean
381
     */
382
    public function getIsAr()
383
    {
384
        return $this->IsAr;
385
    }
386
387
    /**
388
     * @param boolean $IsAr
389
     * @return \Gueststream\PMS\IQWare\API\dtHotelInfos
390
     */
391
    public function setIsAr($IsAr)
392
    {
393
        $this->IsAr = $IsAr;
394
        return $this;
395
    }
396
}
397