This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Gueststream\PMS\IQWare\API; |
||
4 | |||
5 | View Code Duplication | class GetAvailRatesAndRoomsConfigNoEval |
|
0 ignored issues
–
show
|
|||
6 | { |
||
7 | |||
8 | /** |
||
9 | * @var int $iGUID |
||
10 | */ |
||
11 | protected $iGUID = null; |
||
12 | |||
13 | /** |
||
14 | * @var \DateTime $dtArrivalDate |
||
15 | */ |
||
16 | protected $dtArrivalDate = null; |
||
17 | |||
18 | /** |
||
19 | * @var \DateTime $dtDepartureDate |
||
20 | */ |
||
21 | protected $dtDepartureDate = null; |
||
22 | |||
23 | /** |
||
24 | * @var int $intGuestCount |
||
25 | */ |
||
26 | protected $intGuestCount = null; |
||
27 | |||
28 | /** |
||
29 | * @var string $strXmlChildrens |
||
30 | */ |
||
31 | protected $strXmlChildrens = null; |
||
32 | |||
33 | /** |
||
34 | * @var string $ListOfAccomodationTypes |
||
35 | */ |
||
36 | protected $ListOfAccomodationTypes = null; |
||
37 | |||
38 | /** |
||
39 | * @var string $strRateCodes |
||
40 | */ |
||
41 | protected $strRateCodes = null; |
||
42 | |||
43 | /** |
||
44 | * @var string $strRoomTypes |
||
45 | */ |
||
46 | protected $strRoomTypes = null; |
||
47 | |||
48 | /** |
||
49 | * @param int $iGUID |
||
50 | * @param \DateTime $dtArrivalDate |
||
51 | * @param \DateTime $dtDepartureDate |
||
52 | * @param int $intGuestCount |
||
53 | * @param string $strXmlChildrens |
||
54 | * @param string $ListOfAccomodationTypes |
||
55 | * @param string $strRateCodes |
||
56 | * @param string $strRoomTypes |
||
57 | */ |
||
58 | public function __construct($iGUID, \DateTime $dtArrivalDate, \DateTime $dtDepartureDate, $intGuestCount, $strXmlChildrens, $ListOfAccomodationTypes, $strRateCodes, $strRoomTypes) |
||
59 | { |
||
60 | $this->iGUID = $iGUID; |
||
61 | $this->dtArrivalDate = $dtArrivalDate->format(\DateTime::ATOM); |
||
0 ignored issues
–
show
It seems like
$dtArrivalDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $dtArrivalDate .
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.. ![]() |
|||
62 | $this->dtDepartureDate = $dtDepartureDate->format(\DateTime::ATOM); |
||
0 ignored issues
–
show
It seems like
$dtDepartureDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $dtDepartureDate .
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.. ![]() |
|||
63 | $this->intGuestCount = $intGuestCount; |
||
64 | $this->strXmlChildrens = $strXmlChildrens; |
||
65 | $this->ListOfAccomodationTypes = $ListOfAccomodationTypes; |
||
66 | $this->strRateCodes = $strRateCodes; |
||
67 | $this->strRoomTypes = $strRoomTypes; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return int |
||
72 | */ |
||
73 | public function getIGUID() |
||
74 | { |
||
75 | return $this->iGUID; |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @param int $iGUID |
||
80 | * @return \Gueststream\PMS\IQWare\API\GetAvailRatesAndRoomsConfigNoEval |
||
81 | */ |
||
82 | public function setIGUID($iGUID) |
||
83 | { |
||
84 | $this->iGUID = $iGUID; |
||
85 | return $this; |
||
86 | } |
||
87 | |||
88 | /** |
||
89 | * @return \DateTime |
||
90 | */ |
||
91 | public function getDtArrivalDate() |
||
92 | { |
||
93 | if ($this->dtArrivalDate == null) { |
||
94 | return null; |
||
95 | } else { |
||
96 | try { |
||
97 | return new \DateTime($this->dtArrivalDate); |
||
98 | } catch (\Exception $e) { |
||
99 | return false; |
||
100 | } |
||
101 | } |
||
102 | } |
||
103 | |||
104 | /** |
||
105 | * @param \DateTime $dtArrivalDate |
||
106 | * @return \Gueststream\PMS\IQWare\API\GetAvailRatesAndRoomsConfigNoEval |
||
107 | */ |
||
108 | public function setDtArrivalDate(\DateTime $dtArrivalDate) |
||
109 | { |
||
110 | $this->dtArrivalDate = $dtArrivalDate->format(\DateTime::ATOM); |
||
0 ignored issues
–
show
It seems like
$dtArrivalDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $dtArrivalDate .
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.. ![]() |
|||
111 | return $this; |
||
112 | } |
||
113 | |||
114 | /** |
||
115 | * @return \DateTime |
||
116 | */ |
||
117 | public function getDtDepartureDate() |
||
118 | { |
||
119 | if ($this->dtDepartureDate == null) { |
||
120 | return null; |
||
121 | } else { |
||
122 | try { |
||
123 | return new \DateTime($this->dtDepartureDate); |
||
124 | } catch (\Exception $e) { |
||
125 | return false; |
||
126 | } |
||
127 | } |
||
128 | } |
||
129 | |||
130 | /** |
||
131 | * @param \DateTime $dtDepartureDate |
||
132 | * @return \Gueststream\PMS\IQWare\API\GetAvailRatesAndRoomsConfigNoEval |
||
133 | */ |
||
134 | public function setDtDepartureDate(\DateTime $dtDepartureDate) |
||
135 | { |
||
136 | $this->dtDepartureDate = $dtDepartureDate->format(\DateTime::ATOM); |
||
0 ignored issues
–
show
It seems like
$dtDepartureDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $dtDepartureDate .
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.. ![]() |
|||
137 | return $this; |
||
138 | } |
||
139 | |||
140 | /** |
||
141 | * @return int |
||
142 | */ |
||
143 | public function getIntGuestCount() |
||
144 | { |
||
145 | return $this->intGuestCount; |
||
146 | } |
||
147 | |||
148 | /** |
||
149 | * @param int $intGuestCount |
||
150 | * @return \Gueststream\PMS\IQWare\API\GetAvailRatesAndRoomsConfigNoEval |
||
151 | */ |
||
152 | public function setIntGuestCount($intGuestCount) |
||
153 | { |
||
154 | $this->intGuestCount = $intGuestCount; |
||
155 | return $this; |
||
156 | } |
||
157 | |||
158 | /** |
||
159 | * @return string |
||
160 | */ |
||
161 | public function getStrXmlChildrens() |
||
162 | { |
||
163 | return $this->strXmlChildrens; |
||
164 | } |
||
165 | |||
166 | /** |
||
167 | * @param string $strXmlChildrens |
||
168 | * @return \Gueststream\PMS\IQWare\API\GetAvailRatesAndRoomsConfigNoEval |
||
169 | */ |
||
170 | public function setStrXmlChildrens($strXmlChildrens) |
||
171 | { |
||
172 | $this->strXmlChildrens = $strXmlChildrens; |
||
173 | return $this; |
||
174 | } |
||
175 | |||
176 | /** |
||
177 | * @return string |
||
178 | */ |
||
179 | public function getListOfAccomodationTypes() |
||
180 | { |
||
181 | return $this->ListOfAccomodationTypes; |
||
182 | } |
||
183 | |||
184 | /** |
||
185 | * @param string $ListOfAccomodationTypes |
||
186 | * @return \Gueststream\PMS\IQWare\API\GetAvailRatesAndRoomsConfigNoEval |
||
187 | */ |
||
188 | public function setListOfAccomodationTypes($ListOfAccomodationTypes) |
||
189 | { |
||
190 | $this->ListOfAccomodationTypes = $ListOfAccomodationTypes; |
||
191 | return $this; |
||
192 | } |
||
193 | |||
194 | /** |
||
195 | * @return string |
||
196 | */ |
||
197 | public function getStrRateCodes() |
||
198 | { |
||
199 | return $this->strRateCodes; |
||
200 | } |
||
201 | |||
202 | /** |
||
203 | * @param string $strRateCodes |
||
204 | * @return \Gueststream\PMS\IQWare\API\GetAvailRatesAndRoomsConfigNoEval |
||
205 | */ |
||
206 | public function setStrRateCodes($strRateCodes) |
||
207 | { |
||
208 | $this->strRateCodes = $strRateCodes; |
||
209 | return $this; |
||
210 | } |
||
211 | |||
212 | /** |
||
213 | * @return string |
||
214 | */ |
||
215 | public function getStrRoomTypes() |
||
216 | { |
||
217 | return $this->strRoomTypes; |
||
218 | } |
||
219 | |||
220 | /** |
||
221 | * @param string $strRoomTypes |
||
222 | * @return \Gueststream\PMS\IQWare\API\GetAvailRatesAndRoomsConfigNoEval |
||
223 | */ |
||
224 | public function setStrRoomTypes($strRoomTypes) |
||
225 | { |
||
226 | $this->strRoomTypes = $strRoomTypes; |
||
227 | return $this; |
||
228 | } |
||
229 | } |
||
230 |
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.