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/UnitReservation.php (7 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 UnitReservation
6
{
7
8
    /**
9
     * @var int $ID_Guest
10
     */
11
    protected $ID_Guest = 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 TBookingCondoType $BookingCondoType
25
     */
26
    protected $BookingCondoType = null;
27
28
    /**
29
     * @var \DateTime $SystemCreationDate
30
     */
31
    protected $SystemCreationDate = null;
32
33
    /**
34
     * @var float $GrossRevenue
35
     */
36
    protected $GrossRevenue = null;
37
38
    /**
39
     * @var string $RateCodeName
40
     */
41
    protected $RateCodeName = null;
42
43
    /**
44
     * @param int $ID_Guest
45
     * @param \DateTime $ArrivalDate
46
     * @param \DateTime $DepartureDate
47
     * @param TBookingCondoType $BookingCondoType
48
     * @param \DateTime $SystemCreationDate
49
     * @param float $GrossRevenue
50
     */
51 View Code Duplication
    public function __construct($ID_Guest, \DateTime $ArrivalDate, \DateTime $DepartureDate, $BookingCondoType, \DateTime $SystemCreationDate, $GrossRevenue)
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...
52
    {
53
        $this->ID_Guest = $ID_Guest;
54
        $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...
55
        $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...
56
        $this->BookingCondoType = $BookingCondoType;
57
        $this->SystemCreationDate = $SystemCreationDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $SystemCreationDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $SystemCreationDate.

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...
58
        $this->GrossRevenue = $GrossRevenue;
59
    }
60
61
    /**
62
     * @return int
63
     */
64
    public function getID_Guest()
65
    {
66
        return $this->ID_Guest;
67
    }
68
69
    /**
70
     * @param int $ID_Guest
71
     * @return \Gueststream\PMS\IQWare\API\UnitReservation
72
     */
73
    public function setID_Guest($ID_Guest)
74
    {
75
        $this->ID_Guest = $ID_Guest;
76
        return $this;
77
    }
78
79
    /**
80
     * @return \DateTime
81
     */
82
    public function getArrivalDate()
83
    {
84
        if ($this->ArrivalDate == null) {
85
            return null;
86
        } else {
87
            try {
88
                return new \DateTime($this->ArrivalDate);
89
            } catch (\Exception $e) {
90
                return false;
91
            }
92
        }
93
    }
94
95
    /**
96
     * @param \DateTime $ArrivalDate
97
     * @return \Gueststream\PMS\IQWare\API\UnitReservation
98
     */
99
    public function setArrivalDate(\DateTime $ArrivalDate)
100
    {
101
        $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...
102
        return $this;
103
    }
104
105
    /**
106
     * @return \DateTime
107
     */
108
    public function getDepartureDate()
109
    {
110
        if ($this->DepartureDate == null) {
111
            return null;
112
        } else {
113
            try {
114
                return new \DateTime($this->DepartureDate);
115
            } catch (\Exception $e) {
116
                return false;
117
            }
118
        }
119
    }
120
121
    /**
122
     * @param \DateTime $DepartureDate
123
     * @return \Gueststream\PMS\IQWare\API\UnitReservation
124
     */
125
    public function setDepartureDate(\DateTime $DepartureDate)
126
    {
127
        $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...
128
        return $this;
129
    }
130
131
    /**
132
     * @return TBookingCondoType
133
     */
134
    public function getBookingCondoType()
135
    {
136
        return $this->BookingCondoType;
137
    }
138
139
    /**
140
     * @param TBookingCondoType $BookingCondoType
141
     * @return \Gueststream\PMS\IQWare\API\UnitReservation
142
     */
143
    public function setBookingCondoType($BookingCondoType)
144
    {
145
        $this->BookingCondoType = $BookingCondoType;
146
        return $this;
147
    }
148
149
    /**
150
     * @return \DateTime
151
     */
152
    public function getSystemCreationDate()
153
    {
154
        if ($this->SystemCreationDate == null) {
155
            return null;
156
        } else {
157
            try {
158
                return new \DateTime($this->SystemCreationDate);
159
            } catch (\Exception $e) {
160
                return false;
161
            }
162
        }
163
    }
164
165
    /**
166
     * @param \DateTime $SystemCreationDate
167
     * @return \Gueststream\PMS\IQWare\API\UnitReservation
168
     */
169
    public function setSystemCreationDate(\DateTime $SystemCreationDate)
170
    {
171
        $this->SystemCreationDate = $SystemCreationDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $SystemCreationDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $SystemCreationDate.

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...
172
        return $this;
173
    }
174
175
    /**
176
     * @return float
177
     */
178
    public function getGrossRevenue()
179
    {
180
        return $this->GrossRevenue;
181
    }
182
183
    /**
184
     * @param float $GrossRevenue
185
     * @return \Gueststream\PMS\IQWare\API\UnitReservation
186
     */
187
    public function setGrossRevenue($GrossRevenue)
188
    {
189
        $this->GrossRevenue = $GrossRevenue;
190
        return $this;
191
    }
192
193
    /**
194
     * @return string
195
     */
196
    public function getRateCodeName()
197
    {
198
        return $this->RateCodeName;
199
    }
200
201
    /**
202
     * @param string $RateCodeName
203
     * @return \Gueststream\PMS\IQWare\API\UnitReservation
204
     */
205
    public function setRateCodeName($RateCodeName)
206
    {
207
        $this->RateCodeName = $RateCodeName;
208
        return $this;
209
    }
210
}
211