Issues (3099)

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.

Kunstmaan/PagePartBundle/Entity/PagePartRef.php (1 issue)

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 Kunstmaan\PagePartBundle\Entity;
4
5
use Doctrine\ORM\EntityManager;
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * Reference between a page and a pagepart
10
 *
11
 * @ORM\Entity(repositoryClass="Kunstmaan\PagePartBundle\Repository\PagePartRefRepository")
12
 * @ORM\Table(name="kuma_page_part_refs", indexes={@ORM\Index(name="idx_page_part_search", columns={"pageId", "pageEntityname", "context"})})
13
 * @ORM\HasLifecycleCallbacks()
14
 */
15
class PagePartRef
16
{
17
    /**
18
     * @ORM\Id
19
     * @ORM\Column(type="bigint")
20
     * @ORM\GeneratedValue(strategy="AUTO")
21
     */
22
    protected $id;
23
24
    /**
25
     * @ORM\Column(name="pageId", type="bigint")
26
     */
27
    protected $pageId;
28
29
    /**
30
     * @ORM\Column(name="pageEntityname", type="string")
31
     */
32
    protected $pageEntityname;
33
34
    /**
35
     * @ORM\Column(type="string")
36
     */
37
    protected $context;
38
39
    /**
40
     * @ORM\Column(type="integer")
41
     */
42
    protected $sequencenumber;
43
44
    /**
45
     * @ORM\Column(type="bigint")
46
     */
47
    protected $pagePartId;
48
49
    /**
50
     * @ORM\Column(type="string")
51
     */
52
    protected $pagePartEntityname;
53
54
    /**
55
     * @ORM\Column(type="datetime")
56
     */
57
    protected $created;
58
59
    /**
60
     * @ORM\Column(type="datetime")
61
     */
62
    protected $updated;
63
64
    /**
65
     * The constructor
66
     */
67 1
    public function __construct()
68
    {
69 1
        $this->setCreated(new \DateTime());
70 1
        $this->setUpdated(new \DateTime());
71 1
    }
72
73
    /**
74
     * Get id
75
     *
76
     * @return int
77
     */
78 1
    public function getId()
79
    {
80 1
        return $this->id;
81
    }
82
83
    /**
84
     * @param int $num
85
     */
86 1
    public function setId($num)
87
    {
88 1
        $this->id = $num;
89 1
    }
90
91
    /**
92
     * Get pageId
93
     *
94
     * @return int
95
     */
96 1
    public function getPageId()
97
    {
98 1
        return $this->pageId;
99
    }
100
101
    /**
102
     * @param int $id
103
     */
104 1
    public function setPageId($id)
105
    {
106 1
        $this->pageId = $id;
107 1
    }
108
109
    /**
110
     * Get pageEntityname
111
     *
112
     * @return string
113
     */
114 1
    public function getPageEntityname()
115
    {
116 1
        return $this->pageEntityname;
117
    }
118
119
    /**
120
     * Set pageEntityname
121
     *
122
     * @param string $pageEntityname
123
     */
124 1
    public function setPageEntityname($pageEntityname)
125
    {
126 1
        $this->pageEntityname = $pageEntityname;
127 1
    }
128
129
    /**
130
     * get context
131
     *
132
     * @return string
133
     */
134 1
    public function getContext()
135
    {
136 1
        return $this->context;
137
    }
138
139
    /**
140
     * Set context
141
     *
142
     * @param string $context
143
     */
144 1
    public function setContext($context)
145
    {
146 1
        $this->context = $context;
147 1
    }
148
149
    /**
150
     * Get sequencenumber
151
     *
152
     * @return int
153
     */
154 1
    public function getSequencenumber()
155
    {
156 1
        return $this->sequencenumber;
157
    }
158
159
    /**
160
     * Set sequencenumber
161
     *
162
     * @param int $sequencenumber
163
     */
164 1
    public function setSequencenumber($sequencenumber)
165
    {
166 1
        $this->sequencenumber = $sequencenumber;
167 1
    }
168
169
    /**
170
     * Get pagePartId
171
     *
172
     * @return int
173
     */
174 1
    public function getPagePartId()
175
    {
176 1
        return $this->pagePartId;
177
    }
178
179
    /**
180
     * Set pagePartId
181
     *
182
     * @param string $pagePartId
183
     */
184 1
    public function setPagePartId($pagePartId)
185
    {
186 1
        $this->pagePartId = $pagePartId;
187 1
    }
188
189
    /**
190
     * Get pagePartEntityname
191
     *
192
     * @return string
193
     */
194 1
    public function getPagePartEntityname()
195
    {
196 1
        return $this->pagePartEntityname;
197
    }
198
199
    /**
200
     * Set pagePartEntityname
201
     *
202
     * @param string $pagePartEntityname
203
     */
204 1
    public function setPagePartEntityname($pagePartEntityname)
205
    {
206 1
        $this->pagePartEntityname = $pagePartEntityname;
207 1
    }
208
209
    /**
210
     * Get created
211
     *
212
     * @return \DateTime
213
     */
214 1
    public function getCreated()
215
    {
216 1
        return $this->created;
217
    }
218
219
    /**
220
     * Set created
221
     *
222
     * @param \DateTime $created
223
     */
224 1
    public function setCreated(\DateTime $created)
225
    {
226 1
        $this->created = $created;
227 1
    }
228
229
    /**
230
     * Get updated
231
     *
232
     * @return \DateTime
233
     */
234 1
    public function getUpdated()
235
    {
236 1
        return $this->updated;
237
    }
238
239
    /**
240
     * Set updated
241
     *
242
     * @param \DateTime $updated
243
     */
244 1
    public function setUpdated(\DateTime $updated)
245
    {
246 1
        $this->updated = $updated;
247 1
    }
248
249
    /**
250
     * @ORM\PreUpdate
251
     */
252 1
    public function setUpdatedValue()
253
    {
254 1
        $this->setUpdated(new \DateTime());
255 1
    }
256
257
    /**
258
     * @return string
259
     */
260 1
    public function __toString()
261
    {
262 1
        return 'pagepartref in context ' . $this->getContext();
263
    }
264
265
    /**
266
     * @param \Doctrine\ORM\EntityManager $em
267
     *
268
     * @return \Kunstmaan\PagePartBundle\Helper\PagePartInterface
0 ignored issues
show
Should the return type not be \Kunstmaan\PagePartBundl...\PagePartInterface|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
269
     */
270 1
    public function getPagePart(EntityManager $em)
271
    {
272 1
        return $em->getRepository($this->getPagePartEntityname())->find($this->getPagePartId());
273
    }
274
}
275