RoomAvailability   A
last analyzed

Complexity

Total Complexity 23

Size/Duplication

Total Lines 246
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 23
lcom 2
cbo 0
dl 0
loc 246
ccs 0
cts 107
cp 0
rs 10
c 0
b 0
f 0

19 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getIsLeaseBack() 0 4 1
A setIsLeaseBack() 0 5 1
A getIsVirtual() 0 4 1
A setIsVirtual() 0 5 1
A getRoomNo() 0 4 1
A setRoomNo() 0 5 1
A getStartDate() 0 12 3
A setStartDate() 0 5 1
A getEndDate() 0 12 3
A setEndDate() 0 5 1
A getAvailability() 0 4 1
A setAvailability() 0 5 1
A getOwnerReservationValidity() 0 4 1
A setOwnerReservationValidity() 0 5 1
A getOwnerReservationRestrictionType() 0 4 1
A setOwnerReservationRestrictionType() 0 5 1
A getRateYield_MinLengthValidity() 0 4 1
A setRateYield_MinLengthValidity() 0 5 1
1
<?php
2
3
namespace Gueststream\PMS\IQWare\API;
4
5
class RoomAvailability
6
{
7
8
    /**
9
     * @var boolean $IsLeaseBack
10
     */
11
    protected $IsLeaseBack = null;
12
13
    /**
14
     * @var boolean $IsVirtual
15
     */
16
    protected $IsVirtual = null;
17
18
    /**
19
     * @var string $RoomNo
20
     */
21
    protected $RoomNo = null;
22
23
    /**
24
     * @var \DateTime $StartDate
25
     */
26
    protected $StartDate = null;
27
28
    /**
29
     * @var \DateTime $EndDate
30
     */
31
    protected $EndDate = null;
32
33
    /**
34
     * @var ArrayOfRoomDayAvailability $Availability
35
     */
36
    protected $Availability = null;
37
38
    /**
39
     * @var OwnerReservationValidity $OwnerReservationValidity
40
     */
41
    protected $OwnerReservationValidity = null;
42
43
    /**
44
     * @var RoomRestrictionStatus $OwnerReservationRestrictionType
45
     */
46
    protected $OwnerReservationRestrictionType = null;
47
48
    /**
49
     * @var int $RateYield_MinLengthValidity
50
     */
51
    protected $RateYield_MinLengthValidity = null;
52
53
    /**
54
     * @param boolean $IsLeaseBack
55
     * @param boolean $IsVirtual
56
     * @param \DateTime $StartDate
57
     * @param \DateTime $EndDate
58
     * @param OwnerReservationValidity $OwnerReservationValidity
59
     * @param RoomRestrictionStatus $OwnerReservationRestrictionType
60
     * @param int $RateYield_MinLengthValidity
61
     */
62
    public function __construct($IsLeaseBack, $IsVirtual, \DateTime $StartDate, \DateTime $EndDate, $OwnerReservationValidity, $OwnerReservationRestrictionType, $RateYield_MinLengthValidity)
63
    {
64
        $this->IsLeaseBack = $IsLeaseBack;
65
        $this->IsVirtual = $IsVirtual;
66
        $this->StartDate = $StartDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $StartDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $StartDate.

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

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...
68
        $this->OwnerReservationValidity = $OwnerReservationValidity;
69
        $this->OwnerReservationRestrictionType = $OwnerReservationRestrictionType;
70
        $this->RateYield_MinLengthValidity = $RateYield_MinLengthValidity;
71
    }
72
73
    /**
74
     * @return boolean
75
     */
76
    public function getIsLeaseBack()
77
    {
78
        return $this->IsLeaseBack;
79
    }
80
81
    /**
82
     * @param boolean $IsLeaseBack
83
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
84
     */
85
    public function setIsLeaseBack($IsLeaseBack)
86
    {
87
        $this->IsLeaseBack = $IsLeaseBack;
88
        return $this;
89
    }
90
91
    /**
92
     * @return boolean
93
     */
94
    public function getIsVirtual()
95
    {
96
        return $this->IsVirtual;
97
    }
98
99
    /**
100
     * @param boolean $IsVirtual
101
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
102
     */
103
    public function setIsVirtual($IsVirtual)
104
    {
105
        $this->IsVirtual = $IsVirtual;
106
        return $this;
107
    }
108
109
    /**
110
     * @return string
111
     */
112
    public function getRoomNo()
113
    {
114
        return $this->RoomNo;
115
    }
116
117
    /**
118
     * @param string $RoomNo
119
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
120
     */
121
    public function setRoomNo($RoomNo)
122
    {
123
        $this->RoomNo = $RoomNo;
124
        return $this;
125
    }
126
127
    /**
128
     * @return \DateTime
129
     */
130
    public function getStartDate()
131
    {
132
        if ($this->StartDate == null) {
133
            return null;
134
        } else {
135
            try {
136
                return new \DateTime($this->StartDate);
137
            } catch (\Exception $e) {
138
                return false;
139
            }
140
        }
141
    }
142
143
    /**
144
     * @param \DateTime $StartDate
145
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
146
     */
147
    public function setStartDate(\DateTime $StartDate)
148
    {
149
        $this->StartDate = $StartDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $StartDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $StartDate.

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...
150
        return $this;
151
    }
152
153
    /**
154
     * @return \DateTime
155
     */
156
    public function getEndDate()
157
    {
158
        if ($this->EndDate == null) {
159
            return null;
160
        } else {
161
            try {
162
                return new \DateTime($this->EndDate);
163
            } catch (\Exception $e) {
164
                return false;
165
            }
166
        }
167
    }
168
169
    /**
170
     * @param \DateTime $EndDate
171
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
172
     */
173
    public function setEndDate(\DateTime $EndDate)
174
    {
175
        $this->EndDate = $EndDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $EndDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $EndDate.

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...
176
        return $this;
177
    }
178
179
    /**
180
     * @return ArrayOfRoomDayAvailability
181
     */
182
    public function getAvailability()
183
    {
184
        return $this->Availability;
185
    }
186
187
    /**
188
     * @param ArrayOfRoomDayAvailability $Availability
189
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
190
     */
191
    public function setAvailability($Availability)
192
    {
193
        $this->Availability = $Availability;
194
        return $this;
195
    }
196
197
    /**
198
     * @return OwnerReservationValidity
199
     */
200
    public function getOwnerReservationValidity()
201
    {
202
        return $this->OwnerReservationValidity;
203
    }
204
205
    /**
206
     * @param OwnerReservationValidity $OwnerReservationValidity
207
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
208
     */
209
    public function setOwnerReservationValidity($OwnerReservationValidity)
210
    {
211
        $this->OwnerReservationValidity = $OwnerReservationValidity;
212
        return $this;
213
    }
214
215
    /**
216
     * @return RoomRestrictionStatus
217
     */
218
    public function getOwnerReservationRestrictionType()
219
    {
220
        return $this->OwnerReservationRestrictionType;
221
    }
222
223
    /**
224
     * @param RoomRestrictionStatus $OwnerReservationRestrictionType
225
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
226
     */
227
    public function setOwnerReservationRestrictionType($OwnerReservationRestrictionType)
228
    {
229
        $this->OwnerReservationRestrictionType = $OwnerReservationRestrictionType;
230
        return $this;
231
    }
232
233
    /**
234
     * @return int
235
     */
236
    public function getRateYield_MinLengthValidity()
237
    {
238
        return $this->RateYield_MinLengthValidity;
239
    }
240
241
    /**
242
     * @param int $RateYield_MinLengthValidity
243
     * @return \Gueststream\PMS\IQWare\API\RoomAvailability
244
     */
245
    public function setRateYield_MinLengthValidity($RateYield_MinLengthValidity)
246
    {
247
        $this->RateYield_MinLengthValidity = $RateYield_MinLengthValidity;
248
        return $this;
249
    }
250
}
251