1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Gueststream\PMS\IQWare\API; |
4
|
|
|
|
5
|
|
|
class Details |
6
|
|
|
{ |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* @var \DateTime $Day |
10
|
|
|
*/ |
11
|
|
|
protected $Day = null; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @var int $UnitsAvailable |
15
|
|
|
*/ |
16
|
|
|
protected $UnitsAvailable = null; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @var int $UnitsGuaranteed |
20
|
|
|
*/ |
21
|
|
|
protected $UnitsGuaranteed = null; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var int $UnitsNonGuaranteed |
25
|
|
|
*/ |
26
|
|
|
protected $UnitsNonGuaranteed = null; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @param \DateTime $Day |
30
|
|
|
* @param int $UnitsAvailable |
31
|
|
|
* @param int $UnitsGuaranteed |
32
|
|
|
* @param int $UnitsNonGuaranteed |
33
|
|
|
*/ |
34
|
|
|
public function __construct(\DateTime $Day, $UnitsAvailable, $UnitsGuaranteed, $UnitsNonGuaranteed) |
35
|
|
|
{ |
36
|
|
|
$this->Day = $Day->format(\DateTime::ATOM); |
|
|
|
|
37
|
|
|
$this->UnitsAvailable = $UnitsAvailable; |
38
|
|
|
$this->UnitsGuaranteed = $UnitsGuaranteed; |
39
|
|
|
$this->UnitsNonGuaranteed = $UnitsNonGuaranteed; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @return \DateTime |
44
|
|
|
*/ |
45
|
|
|
public function getDay() |
46
|
|
|
{ |
47
|
|
|
if ($this->Day == null) { |
48
|
|
|
return null; |
49
|
|
|
} else { |
50
|
|
|
try { |
51
|
|
|
return new \DateTime($this->Day); |
52
|
|
|
} catch (\Exception $e) { |
53
|
|
|
return false; |
54
|
|
|
} |
55
|
|
|
} |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @param \DateTime $Day |
60
|
|
|
* @return \Gueststream\PMS\IQWare\API\Details |
61
|
|
|
*/ |
62
|
|
|
public function setDay(\DateTime $Day) |
63
|
|
|
{ |
64
|
|
|
$this->Day = $Day->format(\DateTime::ATOM); |
|
|
|
|
65
|
|
|
return $this; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @return int |
70
|
|
|
*/ |
71
|
|
|
public function getUnitsAvailable() |
72
|
|
|
{ |
73
|
|
|
return $this->UnitsAvailable; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @param int $UnitsAvailable |
78
|
|
|
* @return \Gueststream\PMS\IQWare\API\Details |
79
|
|
|
*/ |
80
|
|
|
public function setUnitsAvailable($UnitsAvailable) |
81
|
|
|
{ |
82
|
|
|
$this->UnitsAvailable = $UnitsAvailable; |
83
|
|
|
return $this; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return int |
88
|
|
|
*/ |
89
|
|
|
public function getUnitsGuaranteed() |
90
|
|
|
{ |
91
|
|
|
return $this->UnitsGuaranteed; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @param int $UnitsGuaranteed |
96
|
|
|
* @return \Gueststream\PMS\IQWare\API\Details |
97
|
|
|
*/ |
98
|
|
|
public function setUnitsGuaranteed($UnitsGuaranteed) |
99
|
|
|
{ |
100
|
|
|
$this->UnitsGuaranteed = $UnitsGuaranteed; |
101
|
|
|
return $this; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @return int |
106
|
|
|
*/ |
107
|
|
|
public function getUnitsNonGuaranteed() |
108
|
|
|
{ |
109
|
|
|
return $this->UnitsNonGuaranteed; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @param int $UnitsNonGuaranteed |
114
|
|
|
* @return \Gueststream\PMS\IQWare\API\Details |
115
|
|
|
*/ |
116
|
|
|
public function setUnitsNonGuaranteed($UnitsNonGuaranteed) |
117
|
|
|
{ |
118
|
|
|
$this->UnitsNonGuaranteed = $UnitsNonGuaranteed; |
119
|
|
|
return $this; |
120
|
|
|
} |
121
|
|
|
} |
122
|
|
|
|
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..