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/dtReservations.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 View Code Duplication
class dtReservations
0 ignored issues
show
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 $AccountNo
10
     */
11
    protected $AccountNo = null;
12
13
    /**
14
     * @var \DateTime $ArrivalDate
15
     */
16
    protected $ArrivalDate = null;
17
18
    /**
19
     * @var \DateTime $DepartureDate
20
     */
21
    protected $DepartureDate = null;
22
23
    /**
24
     * @var string $LastName
25
     */
26
    protected $LastName = null;
27
28
    /**
29
     * @var string $FirstName
30
     */
31
    protected $FirstName = null;
32
33
    /**
34
     * @var string $PhoneNo
35
     */
36
    protected $PhoneNo = null;
37
38
    /**
39
     * @var string $CompanyName
40
     */
41
    protected $CompanyName = null;
42
43
    /**
44
     * @var string $ClubCardMemberNo
45
     */
46
    protected $ClubCardMemberNo = null;
47
48
    /**
49
     * @var int $AccountStatus
50
     */
51
    protected $AccountStatus = null;
52
53
    /**
54
     * @param int $AccountNo
55
     * @param \DateTime $ArrivalDate
56
     * @param \DateTime $DepartureDate
57
     * @param string $LastName
58
     * @param string $FirstName
59
     * @param string $PhoneNo
60
     * @param string $CompanyName
61
     * @param string $ClubCardMemberNo
62
     * @param int $AccountStatus
63
     */
64
    public function __construct($AccountNo, \DateTime $ArrivalDate, \DateTime $DepartureDate, $LastName, $FirstName, $PhoneNo, $CompanyName, $ClubCardMemberNo, $AccountStatus)
65
    {
66
        $this->AccountNo = $AccountNo;
67
        $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...
68
        $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...
69
        $this->LastName = $LastName;
70
        $this->FirstName = $FirstName;
71
        $this->PhoneNo = $PhoneNo;
72
        $this->CompanyName = $CompanyName;
73
        $this->ClubCardMemberNo = $ClubCardMemberNo;
74
        $this->AccountStatus = $AccountStatus;
75
    }
76
77
    /**
78
     * @return int
79
     */
80
    public function getAccountNo()
81
    {
82
        return $this->AccountNo;
83
    }
84
85
    /**
86
     * @param int $AccountNo
87
     * @return \Gueststream\PMS\IQWare\API\dtReservations
88
     */
89
    public function setAccountNo($AccountNo)
90
    {
91
        $this->AccountNo = $AccountNo;
92
        return $this;
93
    }
94
95
    /**
96
     * @return \DateTime
97
     */
98
    public function getArrivalDate()
99
    {
100
        if ($this->ArrivalDate == null) {
101
            return null;
102
        } else {
103
            try {
104
                return new \DateTime($this->ArrivalDate);
105
            } catch (\Exception $e) {
106
                return false;
107
            }
108
        }
109
    }
110
111
    /**
112
     * @param \DateTime $ArrivalDate
113
     * @return \Gueststream\PMS\IQWare\API\dtReservations
114
     */
115
    public function setArrivalDate(\DateTime $ArrivalDate)
116
    {
117
        $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...
118
        return $this;
119
    }
120
121
    /**
122
     * @return \DateTime
123
     */
124
    public function getDepartureDate()
125
    {
126
        if ($this->DepartureDate == null) {
127
            return null;
128
        } else {
129
            try {
130
                return new \DateTime($this->DepartureDate);
131
            } catch (\Exception $e) {
132
                return false;
133
            }
134
        }
135
    }
136
137
    /**
138
     * @param \DateTime $DepartureDate
139
     * @return \Gueststream\PMS\IQWare\API\dtReservations
140
     */
141
    public function setDepartureDate(\DateTime $DepartureDate)
142
    {
143
        $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...
144
        return $this;
145
    }
146
147
    /**
148
     * @return string
149
     */
150
    public function getLastName()
151
    {
152
        return $this->LastName;
153
    }
154
155
    /**
156
     * @param string $LastName
157
     * @return \Gueststream\PMS\IQWare\API\dtReservations
158
     */
159
    public function setLastName($LastName)
160
    {
161
        $this->LastName = $LastName;
162
        return $this;
163
    }
164
165
    /**
166
     * @return string
167
     */
168
    public function getFirstName()
169
    {
170
        return $this->FirstName;
171
    }
172
173
    /**
174
     * @param string $FirstName
175
     * @return \Gueststream\PMS\IQWare\API\dtReservations
176
     */
177
    public function setFirstName($FirstName)
178
    {
179
        $this->FirstName = $FirstName;
180
        return $this;
181
    }
182
183
    /**
184
     * @return string
185
     */
186
    public function getPhoneNo()
187
    {
188
        return $this->PhoneNo;
189
    }
190
191
    /**
192
     * @param string $PhoneNo
193
     * @return \Gueststream\PMS\IQWare\API\dtReservations
194
     */
195
    public function setPhoneNo($PhoneNo)
196
    {
197
        $this->PhoneNo = $PhoneNo;
198
        return $this;
199
    }
200
201
    /**
202
     * @return string
203
     */
204
    public function getCompanyName()
205
    {
206
        return $this->CompanyName;
207
    }
208
209
    /**
210
     * @param string $CompanyName
211
     * @return \Gueststream\PMS\IQWare\API\dtReservations
212
     */
213
    public function setCompanyName($CompanyName)
214
    {
215
        $this->CompanyName = $CompanyName;
216
        return $this;
217
    }
218
219
    /**
220
     * @return string
221
     */
222
    public function getClubCardMemberNo()
223
    {
224
        return $this->ClubCardMemberNo;
225
    }
226
227
    /**
228
     * @param string $ClubCardMemberNo
229
     * @return \Gueststream\PMS\IQWare\API\dtReservations
230
     */
231
    public function setClubCardMemberNo($ClubCardMemberNo)
232
    {
233
        $this->ClubCardMemberNo = $ClubCardMemberNo;
234
        return $this;
235
    }
236
237
    /**
238
     * @return int
239
     */
240
    public function getAccountStatus()
241
    {
242
        return $this->AccountStatus;
243
    }
244
245
    /**
246
     * @param int $AccountStatus
247
     * @return \Gueststream\PMS\IQWare\API\dtReservations
248
     */
249
    public function setAccountStatus($AccountStatus)
250
    {
251
        $this->AccountStatus = $AccountStatus;
252
        return $this;
253
    }
254
}
255