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/ArrayOfAvailableSuite.php (2 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 ArrayOfAvailableSuite implements \ArrayAccess, \Iterator, \Countable
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 AvailableSuite[] $AvailableSuite
10
     */
11
    protected $AvailableSuite = null;
12
13
    
14
    public function __construct()
15
    {
16
    
17
    }
18
19
    /**
20
     * @return AvailableSuite[]
21
     */
22
    public function getAvailableSuite()
23
    {
24
        return $this->AvailableSuite;
25
    }
26
27
    /**
28
     * @param AvailableSuite[] $AvailableSuite
29
     * @return \Gueststream\PMS\IQWare\API\ArrayOfAvailableSuite
30
     */
31
    public function setAvailableSuite(array $AvailableSuite = null)
32
    {
33
        $this->AvailableSuite = $AvailableSuite;
0 ignored issues
show
Documentation Bug introduced by
It seems like $AvailableSuite can be null. However, the property $AvailableSuite is declared as array. Maybe change the type of the property to array|null or add a type check?

Our type inference engine has found an assignment of a scalar value (like a string, an integer or null) to a property which is an array.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.

To type hint that a parameter can be either an array or null, you can set a type hint of array and a default value of null. The PHP interpreter will then accept both an array or null for that parameter.

function aContainsB(array $needle = null, array  $haystack) {
    if (!$needle) {
        return false;
    }

    return array_intersect($haystack, $needle) == $haystack;
}

The function can be called with either null or an array for the parameter $needle but will only accept an array as $haystack.

Loading history...
34
        return $this;
35
    }
36
37
    /**
38
     * ArrayAccess implementation
39
     *
40
     * @param mixed $offset An offset to check for
41
     * @return boolean true on success or false on failure
42
     */
43
    public function offsetExists($offset)
44
    {
45
        return isset($this->AvailableSuite[$offset]);
46
    }
47
48
    /**
49
     * ArrayAccess implementation
50
     *
51
     * @param mixed $offset The offset to retrieve
52
     * @return AvailableSuite
53
     */
54
    public function offsetGet($offset)
55
    {
56
        return $this->AvailableSuite[$offset];
57
    }
58
59
    /**
60
     * ArrayAccess implementation
61
     *
62
     * @param mixed $offset The offset to assign the value to
63
     * @param AvailableSuite $value The value to set
64
     * @return void
65
     */
66
    public function offsetSet($offset, $value)
67
    {
68
        $this->AvailableSuite[$offset] = $value;
69
    }
70
71
    /**
72
     * ArrayAccess implementation
73
     *
74
     * @param mixed $offset The offset to unset
75
     * @return void
76
     */
77
    public function offsetUnset($offset)
78
    {
79
        unset($this->AvailableSuite[$offset]);
80
    }
81
82
    /**
83
     * Iterator implementation
84
     *
85
     * @return AvailableSuite Return the current element
86
     */
87
    public function current()
88
    {
89
        return current($this->AvailableSuite);
90
    }
91
92
    /**
93
     * Iterator implementation
94
     * Move forward to next element
95
     *
96
     * @return void
97
     */
98
    public function next()
99
    {
100
        next($this->AvailableSuite);
101
    }
102
103
    /**
104
     * Iterator implementation
105
     *
106
     * @return string|null Return the key of the current element or null
107
     */
108
    public function key()
109
    {
110
        return key($this->AvailableSuite);
111
    }
112
113
    /**
114
     * Iterator implementation
115
     *
116
     * @return boolean Return the validity of the current position
117
     */
118
    public function valid()
119
    {
120
        return $this->key() !== null;
121
    }
122
123
    /**
124
     * Iterator implementation
125
     * Rewind the Iterator to the first element
126
     *
127
     * @return void
128
     */
129
    public function rewind()
130
    {
131
        reset($this->AvailableSuite);
132
    }
133
134
    /**
135
     * Countable implementation
136
     *
137
     * @return AvailableSuite Return count of elements
138
     */
139
    public function count()
140
    {
141
        return count($this->AvailableSuite);
142
    }
143
}
144