Issues (101)

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.

src/Entity/Post.php (1 issue)

Labels
Severity

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 App\Entity;
4
5
use App\Traits\DeletedByTrait;
6
use Doctrine\ORM\Mapping as ORM;
7
use Gedmo\Mapping\Annotation as Gedmo;
8
use JMS\Serializer\Annotation as Serializer;
9
10
/**
11
 * @ORM\Table(name="posts")
12
 * @ORM\Entity(repositoryClass="App\Repository\PostRepository")
13
 * @Gedmo\TranslationEntity(class="App\Entity\Translations\PostTranslation")
14
 * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
15
 * @Serializer\ExclusionPolicy("all")
16
 */
17
class Post extends AbstractTranslateableStory
18
{
19
    use DeletedByTrait;
20
21
    /**
22
     * @var integer
23
     *
24
     * @ORM\Column(name="id", type="integer")
25
     * @ORM\Id
26
     * @ORM\GeneratedValue(strategy="AUTO")
27
     */
28
    protected $id;
29
30
    /**
31
     * @var \Doctrine\Common\Collections\Collection
32
     *
33
     * @ORM\OneToMany(
34
     *     targetEntity="App\Entity\Translations\PostTranslation",
35
     *     mappedBy="object",
36
     *     cascade={"persist", "remove"}
37
     * )
38
     */
39
    protected $translations;
40
41
    /**
42
     * @var \App\Entity\GalleryHasMedia
43
     *
44
     * @ORM\ManyToMany(targetEntity="App\Entity\GalleryHasMedia", cascade={"persist"})
45
     * @ORM\JoinTable(name="post_galleryHasMedia",
46
     *     joinColumns={@ORM\JoinColumn(name="post_id",referencedColumnName="id")},
47
     *     inverseJoinColumns={@ORM\JoinColumn(name="galleryHasMedia_id",referencedColumnName="id")}
48
     * )
49
     */
50
    protected $galleryHasMedia;
51
52
    /**
53
     * \Doctrine\Common\Collections\Collection
54
     *
55
     * @ORM\ManyToMany(targetEntity="App\Entity\Tag", inversedBy="posts", cascade={"persist"})
56
     * @Serializer\Expose
57
     */
58
    protected $tags;
59
60
    /**
61
     * @var bool
62
     *
63
     * @ORM\Column(name="pinned", type="boolean")
64
     * @Serializer\Type("boolean")
65
     * @Serializer\Expose
66
     */
67
    protected $pinned = false;
68
69
    /**
70
     * Constructor
71
     */
72 2
    public function __construct()
73
    {
74 2
        parent::__construct();
75 2
        $this->galleryHasMedia = new \Doctrine\Common\Collections\ArrayCollection();
76 2
        $this->tags = new \Doctrine\Common\Collections\ArrayCollection();
77 2
    }
78
79
    /**
80
     * Get id
81
     *
82
     * @return integer
83
     */
84 2
    public function getId()
85
    {
86 2
        return $this->id;
87
    }
88
89
    /**
90
     * Unset translations
91
     *
92
     * @return Post
93
     */
94 4
    public function unsetTranslations()
95
    {
96 4
        $this->translations = null;
97
98 4
        return $this;
99
    }
100
101
    /**
102
     * Add galleryHasMedia
103
     *
104
     * @param \App\Entity\GalleryHasMedia $galleryHasMedia
105
     * @return self
106
     */
107
    public function addGalleryHasMedia(\App\Entity\GalleryHasMedia $galleryHasMedia)
108
    {
109
        $this->galleryHasMedia[] = $galleryHasMedia;
110
111
        return $this;
112
    }
113
114
    /**
115
     * Remove galleryHasMedia
116
     *
117
     * @param \App\Entity\GalleryHasMedia $galleryHasMedia
118
     */
119
    public function removeGalleryHasMedia(\App\Entity\GalleryHasMedia $galleryHasMedia)
120
    {
121
        $this->galleryHasMedia->removeElement($galleryHasMedia);
0 ignored issues
show
The method removeElement() does not seem to exist on object<App\Entity\GalleryHasMedia>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
122
    }
123
124
    /**
125
     * Get galleryHasMedia
126
     *
127
     * @return \Doctrine\Common\Collections\Collection
128
     */
129 5
    public function getGalleryHasMedia()
130
    {
131 5
        return $this->galleryHasMedia;
132
    }
133
134
    /**
135
     * Add tags
136
     *
137
     * @param \App\Entity\Tag $tags
138
     * @return self
139
     */
140
    public function addTag(\App\Entity\Tag $tags)
141
    {
142
        $this->tags[] = $tags;
143
144
        return $this;
145
    }
146
147
    /**
148
     * Remove tags
149
     *
150
     * @param \App\Entity\Tag $tags
151
     */
152
    public function removeTag(\App\Entity\Tag $tags)
153
    {
154
        $this->tags->removeElement($tags);
155
    }
156
157
    /**
158
     * Get tags
159
     *
160
     * @return \Doctrine\Common\Collections\Collection
161
     */
162 5
    public function getTags()
163
    {
164 5
        return $this->tags;
165
    }
166
167
    /**
168
     * @param boolean $pinned
169
     * @return Post
170
     */
171 1
    public function setPinned($pinned)
172
    {
173 1
        $this->pinned = $pinned;
174
175 1
        return $this;
176
    }
177
178
    /**
179
     * @return boolean
180
     */
181 1
    public function isPinned()
182
    {
183 1
        return $this->pinned;
184
    }
185
}
186