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/cInfo.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 cInfo
6
{
7
8
    /**
9
     * @var boolean $IsMarried
10
     */
11
    protected $IsMarried = null;
12
13
    /**
14
     * @var int $Sex
15
     */
16
    protected $Sex = null;
17
18
    /**
19
     * @var \DateTime $DateOfBirth
20
     */
21
    protected $DateOfBirth = null;
22
23
    /**
24
     * @var string $PassportID
25
     */
26
    protected $PassportID = null;
27
28
    /**
29
     * @var int $ID_Nationality
30
     */
31
    protected $ID_Nationality = null;
32
33
    /**
34
     * @var string $PassportIssuingLocation
35
     */
36
    protected $PassportIssuingLocation = null;
37
38
    /**
39
     * @var \DateTime $PassportExpireDate
40
     */
41
    protected $PassportExpireDate = null;
42
43
    /**
44
     * @param boolean $IsMarried
45
     * @param int $Sex
46
     * @param \DateTime $DateOfBirth
47
     * @param int $ID_Nationality
48
     * @param \DateTime $PassportExpireDate
49
     */
50 View Code Duplication
    public function __construct($IsMarried, $Sex, \DateTime $DateOfBirth, $ID_Nationality, \DateTime $PassportExpireDate)
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...
51
    {
52
        $this->IsMarried = $IsMarried;
53
        $this->Sex = $Sex;
54
        $this->DateOfBirth = $DateOfBirth->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $DateOfBirth->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $DateOfBirth.

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->ID_Nationality = $ID_Nationality;
56
        $this->PassportExpireDate = $PassportExpireDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $PassportExpireDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $PassportExpireDate.

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...
57
    }
58
59
    /**
60
     * @return boolean
61
     */
62
    public function getIsMarried()
63
    {
64
        return $this->IsMarried;
65
    }
66
67
    /**
68
     * @param boolean $IsMarried
69
     * @return \Gueststream\PMS\IQWare\API\cInfo
70
     */
71
    public function setIsMarried($IsMarried)
72
    {
73
        $this->IsMarried = $IsMarried;
74
        return $this;
75
    }
76
77
    /**
78
     * @return int
79
     */
80
    public function getSex()
81
    {
82
        return $this->Sex;
83
    }
84
85
    /**
86
     * @param int $Sex
87
     * @return \Gueststream\PMS\IQWare\API\cInfo
88
     */
89
    public function setSex($Sex)
90
    {
91
        $this->Sex = $Sex;
92
        return $this;
93
    }
94
95
    /**
96
     * @return \DateTime
97
     */
98
    public function getDateOfBirth()
99
    {
100
        if ($this->DateOfBirth == null) {
101
            return null;
102
        } else {
103
            try {
104
                return new \DateTime($this->DateOfBirth);
105
            } catch (\Exception $e) {
106
                return false;
107
            }
108
        }
109
    }
110
111
    /**
112
     * @param \DateTime $DateOfBirth
113
     * @return \Gueststream\PMS\IQWare\API\cInfo
114
     */
115
    public function setDateOfBirth(\DateTime $DateOfBirth)
116
    {
117
        $this->DateOfBirth = $DateOfBirth->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $DateOfBirth->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $DateOfBirth.

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 string
123
     */
124
    public function getPassportID()
125
    {
126
        return $this->PassportID;
127
    }
128
129
    /**
130
     * @param string $PassportID
131
     * @return \Gueststream\PMS\IQWare\API\cInfo
132
     */
133
    public function setPassportID($PassportID)
134
    {
135
        $this->PassportID = $PassportID;
136
        return $this;
137
    }
138
139
    /**
140
     * @return int
141
     */
142
    public function getID_Nationality()
143
    {
144
        return $this->ID_Nationality;
145
    }
146
147
    /**
148
     * @param int $ID_Nationality
149
     * @return \Gueststream\PMS\IQWare\API\cInfo
150
     */
151
    public function setID_Nationality($ID_Nationality)
152
    {
153
        $this->ID_Nationality = $ID_Nationality;
154
        return $this;
155
    }
156
157
    /**
158
     * @return string
159
     */
160
    public function getPassportIssuingLocation()
161
    {
162
        return $this->PassportIssuingLocation;
163
    }
164
165
    /**
166
     * @param string $PassportIssuingLocation
167
     * @return \Gueststream\PMS\IQWare\API\cInfo
168
     */
169
    public function setPassportIssuingLocation($PassportIssuingLocation)
170
    {
171
        $this->PassportIssuingLocation = $PassportIssuingLocation;
172
        return $this;
173
    }
174
175
    /**
176
     * @return \DateTime
177
     */
178
    public function getPassportExpireDate()
179
    {
180
        if ($this->PassportExpireDate == null) {
181
            return null;
182
        } else {
183
            try {
184
                return new \DateTime($this->PassportExpireDate);
185
            } catch (\Exception $e) {
186
                return false;
187
            }
188
        }
189
    }
190
191
    /**
192
     * @param \DateTime $PassportExpireDate
193
     * @return \Gueststream\PMS\IQWare\API\cInfo
194
     */
195
    public function setPassportExpireDate(\DateTime $PassportExpireDate)
196
    {
197
        $this->PassportExpireDate = $PassportExpireDate->format(\DateTime::ATOM);
0 ignored issues
show
Documentation Bug introduced by
It seems like $PassportExpireDate->format(\DateTime::ATOM) of type string is incompatible with the declared type object<DateTime> of property $PassportExpireDate.

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...
198
        return $this;
199
    }
200
}
201