Issues (1704)

Branch: master

Security Analysis    not enabled

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.

Bundle/WidgetMapBundle/Entity/Slot.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 Victoire\Bundle\WidgetMapBundle\Entity;
4
5
class Slot
0 ignored issues
show
Missing class doc comment
Loading history...
6
{
7
    //the id
8
    protected $id = null;
9
    protected $widgetMaps = null;
10
11
    /**
12
     * Constructor.
13
     */
14
    public function __construct()
15
    {
16
        $this->widgetMaps = [];
17
    }
18
19
    /**
20
     * Get the id.
21
     *
22
     * @return string The id
23
     */
24
    public function getId()
25
    {
26
        return $this->id;
27
    }
28
29
    /**
30
     * Set the id.
31
     *
32
     * @param string $id
33
     */
34
    public function setId($id)
35
    {
36
        $this->id = $id;
37
    }
38
39
    /**
40
     * Set the widget maps for this slot.
41
     *
42
     * @param array $widgetMaps
43
     */
44
    public function setWidgetMaps($widgetMaps)
45
    {
46
        $this->widgetMaps = $widgetMaps;
47
    }
48
49
    /**
50
     * Get the widget maps.
51
     *
52
     * @return WidgetMap[] The widget maps
53
     */
54
    public function getWidgetMaps()
55
    {
56
        return $this->widgetMaps;
57
    }
58
59
    /**
60
     * Add a widget map to the list of widget maps.
61
     *
62
     * @param WidgetMap $widgetMap
63
     */
64
    public function addWidgetMap(WidgetMap $widgetMap)
65
    {
66
        $this->widgetMaps[] = $widgetMap;
67
    }
68
69
    /**
70
     * Update the given widgetMap.
71
     *
72
     * @param WidgetMap $widgetMap
73
     *
74
     * @return Slot
75
     */
76
    public function updateWidgetMap($widgetMap)
77
    {
78
        //parse all widfgetMaps
79
        foreach ($this->widgetMaps as $key => $_widgetMap) {
80
            //if this the widgetMap we are looking for
81
            if ($_widgetMap->getWidgetId() === $widgetMap->getWidgetId()) {
0 ignored issues
show
The method getWidgetId() does not exist on Victoire\Bundle\WidgetMapBundle\Entity\WidgetMap. Did you maybe mean getWidget()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
82
                $this->widgetMaps[$key] = $widgetMap;
83
                //there no need to continue, we found the slot
84
                break;
85
            }
86
        }
87
88
        return $this;
89
    }
90
91
    /**
92
     * Get the widget map by the widget id.
93
     *
94
     * @param int $widgetId
95
     *
96
     * @return WidgetMap
97
     */
98
    public function getWidgetMapByWidgetId($widgetId)
99
    {
100
        $widgetMap = null;
101
102
        $widgetMaps = $this->widgetMaps;
103
104
        //parse the widgets maps
105
        foreach ($widgetMaps as $wm) {
106
            if ($wm->getWidgetId() === $widgetId) {
107
                $widgetMap = $wm;
108
                //entity found, there is no need to continue
109
                break;
110
            }
111
        }
112
113
        return $widgetMap;
114
    }
115
116
    /**
117
     * Remove the widget map from the slot.
118
     *
119
     * @param WidgetMap $widgetMap
120
     */
121
    public function removeWidgetMap(WidgetMap $widgetMap)
122
    {
123
        $widgetMaps = $this->widgetMaps;
124
125
        //parse the widgets maps
126
        foreach ($widgetMaps as $index => $wm) {
127
            if ($wm->getWidgetId() === $widgetMap->getWidgetId()) {
0 ignored issues
show
The method getWidgetId() does not exist on Victoire\Bundle\WidgetMapBundle\Entity\WidgetMap. Did you maybe mean getWidget()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
128
                unset($this->widgetMaps[$index]);
129
                //entity found, there is no need to continue
130
                break;
131
            }
132
        }
133
    }
134
}
135