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/SummaryItem.php (3 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 SummaryItem
6
{
7
8
    /**
9
     * @var int $RoomIndex
10
     */
11
    protected $RoomIndex = null;
12
13
    /**
14
     * @var int $ID_CodeSrc
15
     */
16
    protected $ID_CodeSrc = null;
17
18
    /**
19
     * @var string $CodeName
20
     */
21
    protected $CodeName = null;
22
23
    /**
24
     * @var PricingSBDItemType $ItemType
25
     */
26
    protected $ItemType = null;
27
28
    /**
29
     * @var \DateTime $ADate
30
     */
31
    protected $ADate = null;
32
33
    /**
34
     * @var string $QtyElem
35
     */
36
    protected $QtyElem = null;
37
38
    /**
39
     * @var float $AmountBeforeTaxes
40
     */
41
    protected $AmountBeforeTaxes = null;
42
43
    /**
44
     * @var float $Taxes
45
     */
46
    protected $Taxes = null;
47
48
    /**
49
     * @var int $ID_Currency
50
     */
51
    protected $ID_Currency = null;
52
53
    /**
54
     * @var boolean $InTheRate
55
     */
56
    protected $InTheRate = null;
57
58
    /**
59
     * @param int $RoomIndex
60
     * @param int $ID_CodeSrc
61
     * @param PricingSBDItemType $ItemType
62
     * @param \DateTime $ADate
63
     * @param float $AmountBeforeTaxes
64
     * @param float $Taxes
65
     * @param int $ID_Currency
66
     * @param boolean $InTheRate
67
     */
68 View Code Duplication
    public function __construct($RoomIndex, $ID_CodeSrc, $ItemType, \DateTime $ADate, $AmountBeforeTaxes, $Taxes, $ID_Currency, $InTheRate)
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...
69
    {
70
        $this->RoomIndex = $RoomIndex;
71
        $this->ID_CodeSrc = $ID_CodeSrc;
72
        $this->ItemType = $ItemType;
73
        $this->ADate = $ADate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $ADate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $ADate.

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...
74
        $this->AmountBeforeTaxes = $AmountBeforeTaxes;
75
        $this->Taxes = $Taxes;
76
        $this->ID_Currency = $ID_Currency;
77
        $this->InTheRate = $InTheRate;
78
    }
79
80
    /**
81
     * @return int
82
     */
83
    public function getRoomIndex()
84
    {
85
        return $this->RoomIndex;
86
    }
87
88
    /**
89
     * @param int $RoomIndex
90
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
91
     */
92
    public function setRoomIndex($RoomIndex)
93
    {
94
        $this->RoomIndex = $RoomIndex;
95
        return $this;
96
    }
97
98
    /**
99
     * @return int
100
     */
101
    public function getID_CodeSrc()
102
    {
103
        return $this->ID_CodeSrc;
104
    }
105
106
    /**
107
     * @param int $ID_CodeSrc
108
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
109
     */
110
    public function setID_CodeSrc($ID_CodeSrc)
111
    {
112
        $this->ID_CodeSrc = $ID_CodeSrc;
113
        return $this;
114
    }
115
116
    /**
117
     * @return string
118
     */
119
    public function getCodeName()
120
    {
121
        return $this->CodeName;
122
    }
123
124
    /**
125
     * @param string $CodeName
126
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
127
     */
128
    public function setCodeName($CodeName)
129
    {
130
        $this->CodeName = $CodeName;
131
        return $this;
132
    }
133
134
    /**
135
     * @return PricingSBDItemType
136
     */
137
    public function getItemType()
138
    {
139
        return $this->ItemType;
140
    }
141
142
    /**
143
     * @param PricingSBDItemType $ItemType
144
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
145
     */
146
    public function setItemType($ItemType)
147
    {
148
        $this->ItemType = $ItemType;
149
        return $this;
150
    }
151
152
    /**
153
     * @return \DateTime
154
     */
155
    public function getADate()
156
    {
157
        if ($this->ADate == null) {
158
            return null;
159
        } else {
160
            try {
161
                return new \DateTime($this->ADate);
162
            } catch (\Exception $e) {
163
                return false;
164
            }
165
        }
166
    }
167
168
    /**
169
     * @param \DateTime $ADate
170
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
171
     */
172
    public function setADate(\DateTime $ADate)
173
    {
174
        $this->ADate = $ADate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $ADate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $ADate.

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...
175
        return $this;
176
    }
177
178
    /**
179
     * @return string
180
     */
181
    public function getQtyElem()
182
    {
183
        return $this->QtyElem;
184
    }
185
186
    /**
187
     * @param string $QtyElem
188
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
189
     */
190
    public function setQtyElem($QtyElem)
191
    {
192
        $this->QtyElem = $QtyElem;
193
        return $this;
194
    }
195
196
    /**
197
     * @return float
198
     */
199
    public function getAmountBeforeTaxes()
200
    {
201
        return $this->AmountBeforeTaxes;
202
    }
203
204
    /**
205
     * @param float $AmountBeforeTaxes
206
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
207
     */
208
    public function setAmountBeforeTaxes($AmountBeforeTaxes)
209
    {
210
        $this->AmountBeforeTaxes = $AmountBeforeTaxes;
211
        return $this;
212
    }
213
214
    /**
215
     * @return float
216
     */
217
    public function getTaxes()
218
    {
219
        return $this->Taxes;
220
    }
221
222
    /**
223
     * @param float $Taxes
224
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
225
     */
226
    public function setTaxes($Taxes)
227
    {
228
        $this->Taxes = $Taxes;
229
        return $this;
230
    }
231
232
    /**
233
     * @return int
234
     */
235
    public function getID_Currency()
236
    {
237
        return $this->ID_Currency;
238
    }
239
240
    /**
241
     * @param int $ID_Currency
242
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
243
     */
244
    public function setID_Currency($ID_Currency)
245
    {
246
        $this->ID_Currency = $ID_Currency;
247
        return $this;
248
    }
249
250
    /**
251
     * @return boolean
252
     */
253
    public function getInTheRate()
254
    {
255
        return $this->InTheRate;
256
    }
257
258
    /**
259
     * @param boolean $InTheRate
260
     * @return \Gueststream\PMS\IQWare\API\SummaryItem
261
     */
262
    public function setInTheRate($InTheRate)
263
    {
264
        $this->InTheRate = $InTheRate;
265
        return $this;
266
    }
267
}
268