setDepartureDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 5
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Gueststream\PMS\IQWare\API;
4
5 View Code Duplication
class getAllRoomsAvailabilityForStayFast
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
8
    /**
9
     * @var int $guid
10
     */
11
    protected $guid = null;
12
13
    /**
14
     * @var string $strRoomIDs
15
     */
16
    protected $strRoomIDs = null;
17
18
    /**
19
     * @var string $strRoomTypeIDs
20
     */
21
    protected $strRoomTypeIDs = null;
22
23
    /**
24
     * @var string $strRoomAttributeIDs
25
     */
26
    protected $strRoomAttributeIDs = null;
27
28
    /**
29
     * @var string $strRoomLocationIDs
30
     */
31
    protected $strRoomLocationIDs = null;
32
33
    /**
34
     * @var string $strBuildingIDs
35
     */
36
    protected $strBuildingIDs = null;
37
38
    /**
39
     * @var string $strBeddingIDs
40
     */
41
    protected $strBeddingIDs = null;
42
43
    /**
44
     * @var \DateTime $ArrivalDate
45
     */
46
    protected $ArrivalDate = null;
47
48
    /**
49
     * @var \DateTime $DepartureDate
50
     */
51
    protected $DepartureDate = null;
52
53
    /**
54
     * @var string $strAttributeGroupings
55
     */
56
    protected $strAttributeGroupings = null;
57
58
    /**
59
     * @var string $strLocationsGroupings
60
     */
61
    protected $strLocationsGroupings = null;
62
63
    /**
64
     * @var InventoryResponse $HotelInventoryResponse
65
     */
66
    protected $HotelInventoryResponse = null;
67
68
    /**
69
     * @param int $guid
70
     * @param string $strRoomIDs
71
     * @param string $strRoomTypeIDs
72
     * @param string $strRoomAttributeIDs
73
     * @param string $strRoomLocationIDs
74
     * @param string $strBuildingIDs
75
     * @param string $strBeddingIDs
76
     * @param \DateTime $ArrivalDate
77
     * @param \DateTime $DepartureDate
78
     * @param string $strAttributeGroupings
79
     * @param string $strLocationsGroupings
80
     * @param InventoryResponse $HotelInventoryResponse
81
     */
82
    public function __construct($guid, $strRoomIDs, $strRoomTypeIDs, $strRoomAttributeIDs, $strRoomLocationIDs, $strBuildingIDs, $strBeddingIDs, \DateTime $ArrivalDate, \DateTime $DepartureDate, $strAttributeGroupings, $strLocationsGroupings, $HotelInventoryResponse)
83
    {
84
        $this->guid = $guid;
85
        $this->strRoomIDs = $strRoomIDs;
86
        $this->strRoomTypeIDs = $strRoomTypeIDs;
87
        $this->strRoomAttributeIDs = $strRoomAttributeIDs;
88
        $this->strRoomLocationIDs = $strRoomLocationIDs;
89
        $this->strBuildingIDs = $strBuildingIDs;
90
        $this->strBeddingIDs = $strBeddingIDs;
91
        $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...
92
        $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...
93
        $this->strAttributeGroupings = $strAttributeGroupings;
94
        $this->strLocationsGroupings = $strLocationsGroupings;
95
        $this->HotelInventoryResponse = $HotelInventoryResponse;
96
    }
97
98
    /**
99
     * @return int
100
     */
101
    public function getGuid()
102
    {
103
        return $this->guid;
104
    }
105
106
    /**
107
     * @param int $guid
108
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
109
     */
110
    public function setGuid($guid)
111
    {
112
        $this->guid = $guid;
113
        return $this;
114
    }
115
116
    /**
117
     * @return string
118
     */
119
    public function getStrRoomIDs()
120
    {
121
        return $this->strRoomIDs;
122
    }
123
124
    /**
125
     * @param string $strRoomIDs
126
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
127
     */
128
    public function setStrRoomIDs($strRoomIDs)
129
    {
130
        $this->strRoomIDs = $strRoomIDs;
131
        return $this;
132
    }
133
134
    /**
135
     * @return string
136
     */
137
    public function getStrRoomTypeIDs()
138
    {
139
        return $this->strRoomTypeIDs;
140
    }
141
142
    /**
143
     * @param string $strRoomTypeIDs
144
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
145
     */
146
    public function setStrRoomTypeIDs($strRoomTypeIDs)
147
    {
148
        $this->strRoomTypeIDs = $strRoomTypeIDs;
149
        return $this;
150
    }
151
152
    /**
153
     * @return string
154
     */
155
    public function getStrRoomAttributeIDs()
156
    {
157
        return $this->strRoomAttributeIDs;
158
    }
159
160
    /**
161
     * @param string $strRoomAttributeIDs
162
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
163
     */
164
    public function setStrRoomAttributeIDs($strRoomAttributeIDs)
165
    {
166
        $this->strRoomAttributeIDs = $strRoomAttributeIDs;
167
        return $this;
168
    }
169
170
    /**
171
     * @return string
172
     */
173
    public function getStrRoomLocationIDs()
174
    {
175
        return $this->strRoomLocationIDs;
176
    }
177
178
    /**
179
     * @param string $strRoomLocationIDs
180
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
181
     */
182
    public function setStrRoomLocationIDs($strRoomLocationIDs)
183
    {
184
        $this->strRoomLocationIDs = $strRoomLocationIDs;
185
        return $this;
186
    }
187
188
    /**
189
     * @return string
190
     */
191
    public function getStrBuildingIDs()
192
    {
193
        return $this->strBuildingIDs;
194
    }
195
196
    /**
197
     * @param string $strBuildingIDs
198
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
199
     */
200
    public function setStrBuildingIDs($strBuildingIDs)
201
    {
202
        $this->strBuildingIDs = $strBuildingIDs;
203
        return $this;
204
    }
205
206
    /**
207
     * @return string
208
     */
209
    public function getStrBeddingIDs()
210
    {
211
        return $this->strBeddingIDs;
212
    }
213
214
    /**
215
     * @param string $strBeddingIDs
216
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
217
     */
218
    public function setStrBeddingIDs($strBeddingIDs)
219
    {
220
        $this->strBeddingIDs = $strBeddingIDs;
221
        return $this;
222
    }
223
224
    /**
225
     * @return \DateTime
226
     */
227
    public function getArrivalDate()
228
    {
229
        if ($this->ArrivalDate == null) {
230
            return null;
231
        } else {
232
            try {
233
                return new \DateTime($this->ArrivalDate);
234
            } catch (\Exception $e) {
235
                return false;
236
            }
237
        }
238
    }
239
240
    /**
241
     * @param \DateTime $ArrivalDate
242
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
243
     */
244
    public function setArrivalDate(\DateTime $ArrivalDate)
245
    {
246
        $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...
247
        return $this;
248
    }
249
250
    /**
251
     * @return \DateTime
252
     */
253
    public function getDepartureDate()
254
    {
255
        if ($this->DepartureDate == null) {
256
            return null;
257
        } else {
258
            try {
259
                return new \DateTime($this->DepartureDate);
260
            } catch (\Exception $e) {
261
                return false;
262
            }
263
        }
264
    }
265
266
    /**
267
     * @param \DateTime $DepartureDate
268
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
269
     */
270
    public function setDepartureDate(\DateTime $DepartureDate)
271
    {
272
        $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...
273
        return $this;
274
    }
275
276
    /**
277
     * @return string
278
     */
279
    public function getStrAttributeGroupings()
280
    {
281
        return $this->strAttributeGroupings;
282
    }
283
284
    /**
285
     * @param string $strAttributeGroupings
286
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
287
     */
288
    public function setStrAttributeGroupings($strAttributeGroupings)
289
    {
290
        $this->strAttributeGroupings = $strAttributeGroupings;
291
        return $this;
292
    }
293
294
    /**
295
     * @return string
296
     */
297
    public function getStrLocationsGroupings()
298
    {
299
        return $this->strLocationsGroupings;
300
    }
301
302
    /**
303
     * @param string $strLocationsGroupings
304
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
305
     */
306
    public function setStrLocationsGroupings($strLocationsGroupings)
307
    {
308
        $this->strLocationsGroupings = $strLocationsGroupings;
309
        return $this;
310
    }
311
312
    /**
313
     * @return InventoryResponse
314
     */
315
    public function getHotelInventoryResponse()
316
    {
317
        return $this->HotelInventoryResponse;
318
    }
319
320
    /**
321
     * @param InventoryResponse $HotelInventoryResponse
322
     * @return \Gueststream\PMS\IQWare\API\getAllRoomsAvailabilityForStayFast
323
     */
324
    public function setHotelInventoryResponse($HotelInventoryResponse)
325
    {
326
        $this->HotelInventoryResponse = $HotelInventoryResponse;
327
        return $this;
328
    }
329
}
330