Issues (1169)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/API/GroupReservations.php (5 issues)

Upgrade to new PHP Analysis Engine

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
class GroupReservations
6
{
7
8
    /**
9
     * @var int $ID_Account
10
     */
11
    protected $ID_Account = null;
12
13
    /**
14
     * @var int $AccountNo
15
     */
16
    protected $AccountNo = null;
17
18
    /**
19
     * @var string $RoomNo
20
     */
21
    protected $RoomNo = null;
22
23
    /**
24
     * @var string $AccountName
25
     */
26
    protected $AccountName = null;
27
28
    /**
29
     * @var int $ID_RoomType
30
     */
31
    protected $ID_RoomType = null;
32
33
    /**
34
     * @var string $RoomTypeName
35
     */
36
    protected $RoomTypeName = null;
37
38
    /**
39
     * @var int $RoomQty
40
     */
41
    protected $RoomQty = null;
42
43
    /**
44
     * @var int $GuestTotal
45
     */
46
    protected $GuestTotal = null;
47
48
    /**
49
     * @var \DateTime $ArrivalDate
50
     */
51
    protected $ArrivalDate = null;
52
53
    /**
54
     * @var \DateTime $DepartureDate
55
     */
56
    protected $DepartureDate = null;
57
58
    /**
59
     * @var int $ID_Group
60
     */
61
    protected $ID_Group = null;
62
63
    /**
64
     * @var int $AccountStatus
65
     */
66
    protected $AccountStatus = null;
67
68
    /**
69
     * @var string $AccountStatusString
70
     */
71
    protected $AccountStatusString = null;
72
73
    /**
74
     * @var string $ID_RateCode
75
     */
76
    protected $ID_RateCode = null;
77
78
    /**
79
     * @param int $ID_Account
80
     * @param int $AccountNo
81
     * @param string $RoomNo
82
     * @param string $AccountName
83
     * @param int $ID_RoomType
84
     * @param string $RoomTypeName
85
     * @param int $RoomQty
86
     * @param int $GuestTotal
87
     * @param \DateTime $ArrivalDate
88
     * @param \DateTime $DepartureDate
89
     * @param int $ID_Group
90
     * @param int $AccountStatus
91
     * @param string $AccountStatusString
92
     * @param string $ID_RateCode
93
     */
94 View Code Duplication
    public function __construct($ID_Account, $AccountNo, $RoomNo, $AccountName, $ID_RoomType, $RoomTypeName, $RoomQty, $GuestTotal, \DateTime $ArrivalDate, \DateTime $DepartureDate, $ID_Group, $AccountStatus, $AccountStatusString, $ID_RateCode)
0 ignored issues
show
This method 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...
95
    {
96
        $this->ID_Account = $ID_Account;
97
        $this->AccountNo = $AccountNo;
98
        $this->RoomNo = $RoomNo;
99
        $this->AccountName = $AccountName;
100
        $this->ID_RoomType = $ID_RoomType;
101
        $this->RoomTypeName = $RoomTypeName;
102
        $this->RoomQty = $RoomQty;
103
        $this->GuestTotal = $GuestTotal;
104
        $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...
105
        $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...
106
        $this->ID_Group = $ID_Group;
107
        $this->AccountStatus = $AccountStatus;
108
        $this->AccountStatusString = $AccountStatusString;
109
        $this->ID_RateCode = $ID_RateCode;
110
    }
111
112
    /**
113
     * @return int
114
     */
115
    public function getID_Account()
116
    {
117
        return $this->ID_Account;
118
    }
119
120
    /**
121
     * @param int $ID_Account
122
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
123
     */
124
    public function setID_Account($ID_Account)
125
    {
126
        $this->ID_Account = $ID_Account;
127
        return $this;
128
    }
129
130
    /**
131
     * @return int
132
     */
133
    public function getAccountNo()
134
    {
135
        return $this->AccountNo;
136
    }
137
138
    /**
139
     * @param int $AccountNo
140
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
141
     */
142
    public function setAccountNo($AccountNo)
143
    {
144
        $this->AccountNo = $AccountNo;
145
        return $this;
146
    }
147
148
    /**
149
     * @return string
150
     */
151
    public function getRoomNo()
152
    {
153
        return $this->RoomNo;
154
    }
155
156
    /**
157
     * @param string $RoomNo
158
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
159
     */
160
    public function setRoomNo($RoomNo)
161
    {
162
        $this->RoomNo = $RoomNo;
163
        return $this;
164
    }
165
166
    /**
167
     * @return string
168
     */
169
    public function getAccountName()
170
    {
171
        return $this->AccountName;
172
    }
173
174
    /**
175
     * @param string $AccountName
176
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
177
     */
178
    public function setAccountName($AccountName)
179
    {
180
        $this->AccountName = $AccountName;
181
        return $this;
182
    }
183
184
    /**
185
     * @return int
186
     */
187
    public function getID_RoomType()
188
    {
189
        return $this->ID_RoomType;
190
    }
191
192
    /**
193
     * @param int $ID_RoomType
194
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
195
     */
196
    public function setID_RoomType($ID_RoomType)
197
    {
198
        $this->ID_RoomType = $ID_RoomType;
199
        return $this;
200
    }
201
202
    /**
203
     * @return string
204
     */
205
    public function getRoomTypeName()
206
    {
207
        return $this->RoomTypeName;
208
    }
209
210
    /**
211
     * @param string $RoomTypeName
212
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
213
     */
214
    public function setRoomTypeName($RoomTypeName)
215
    {
216
        $this->RoomTypeName = $RoomTypeName;
217
        return $this;
218
    }
219
220
    /**
221
     * @return int
222
     */
223
    public function getRoomQty()
224
    {
225
        return $this->RoomQty;
226
    }
227
228
    /**
229
     * @param int $RoomQty
230
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
231
     */
232
    public function setRoomQty($RoomQty)
233
    {
234
        $this->RoomQty = $RoomQty;
235
        return $this;
236
    }
237
238
    /**
239
     * @return int
240
     */
241
    public function getGuestTotal()
242
    {
243
        return $this->GuestTotal;
244
    }
245
246
    /**
247
     * @param int $GuestTotal
248
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
249
     */
250
    public function setGuestTotal($GuestTotal)
251
    {
252
        $this->GuestTotal = $GuestTotal;
253
        return $this;
254
    }
255
256
    /**
257
     * @return \DateTime
258
     */
259
    public function getArrivalDate()
260
    {
261
        if ($this->ArrivalDate == null) {
262
            return null;
263
        } else {
264
            try {
265
                return new \DateTime($this->ArrivalDate);
266
            } catch (\Exception $e) {
267
                return false;
268
            }
269
        }
270
    }
271
272
    /**
273
     * @param \DateTime $ArrivalDate
274
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
275
     */
276
    public function setArrivalDate(\DateTime $ArrivalDate)
277
    {
278
        $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...
279
        return $this;
280
    }
281
282
    /**
283
     * @return \DateTime
284
     */
285
    public function getDepartureDate()
286
    {
287
        if ($this->DepartureDate == null) {
288
            return null;
289
        } else {
290
            try {
291
                return new \DateTime($this->DepartureDate);
292
            } catch (\Exception $e) {
293
                return false;
294
            }
295
        }
296
    }
297
298
    /**
299
     * @param \DateTime $DepartureDate
300
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
301
     */
302
    public function setDepartureDate(\DateTime $DepartureDate)
303
    {
304
        $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...
305
        return $this;
306
    }
307
308
    /**
309
     * @return int
310
     */
311
    public function getID_Group()
312
    {
313
        return $this->ID_Group;
314
    }
315
316
    /**
317
     * @param int $ID_Group
318
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
319
     */
320
    public function setID_Group($ID_Group)
321
    {
322
        $this->ID_Group = $ID_Group;
323
        return $this;
324
    }
325
326
    /**
327
     * @return int
328
     */
329
    public function getAccountStatus()
330
    {
331
        return $this->AccountStatus;
332
    }
333
334
    /**
335
     * @param int $AccountStatus
336
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
337
     */
338
    public function setAccountStatus($AccountStatus)
339
    {
340
        $this->AccountStatus = $AccountStatus;
341
        return $this;
342
    }
343
344
    /**
345
     * @return string
346
     */
347
    public function getAccountStatusString()
348
    {
349
        return $this->AccountStatusString;
350
    }
351
352
    /**
353
     * @param string $AccountStatusString
354
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
355
     */
356
    public function setAccountStatusString($AccountStatusString)
357
    {
358
        $this->AccountStatusString = $AccountStatusString;
359
        return $this;
360
    }
361
362
    /**
363
     * @return string
364
     */
365
    public function getID_RateCode()
366
    {
367
        return $this->ID_RateCode;
368
    }
369
370
    /**
371
     * @param string $ID_RateCode
372
     * @return \Gueststream\PMS\IQWare\API\GroupReservations
373
     */
374
    public function setID_RateCode($ID_RateCode)
375
    {
376
        $this->ID_RateCode = $ID_RateCode;
377
        return $this;
378
    }
379
}
380