This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
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 | use Symfony\Component\Validator\Constraints as Assert; |
||
10 | |||
11 | /** |
||
12 | * @ORM\Table(name="history") |
||
13 | * @ORM\Entity(repositoryClass="App\Repository\HistoryRepository") |
||
14 | * @Gedmo\TranslationEntity(class="App\Entity\Translations\HistoryTranslation") |
||
15 | * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false) |
||
16 | * @Serializer\ExclusionPolicy("all") |
||
17 | */ |
||
18 | class History extends AbstractTranslateableStory |
||
19 | { |
||
20 | use DeletedByTrait; |
||
21 | |||
22 | /** |
||
23 | * @var integer |
||
24 | * |
||
25 | * @ORM\Column(name="id", type="integer") |
||
26 | * @ORM\Id |
||
27 | * @ORM\GeneratedValue(strategy="AUTO") |
||
28 | */ |
||
29 | protected $id; |
||
30 | |||
31 | /** |
||
32 | * @var /Datetime |
||
33 | * |
||
34 | * @Assert\NotBlank() |
||
35 | * @ORM\Column(type="datetime") |
||
36 | * @Serializer\Type("DateTime") |
||
37 | */ |
||
38 | protected $dateTime; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | * |
||
43 | * @Serializer\Type("integer") |
||
44 | * @Serializer\Expose |
||
45 | * @Serializer\Accessor(getter="getYear") |
||
46 | */ |
||
47 | protected $year; |
||
48 | |||
49 | /** |
||
50 | * @var \Doctrine\Common\Collections\Collection |
||
51 | * |
||
52 | * @ORM\OneToMany( |
||
53 | * targetEntity="App\Entity\Translations\HistoryTranslation", |
||
54 | * mappedBy="object", |
||
55 | * cascade={"persist", "remove"} |
||
56 | * ) |
||
57 | */ |
||
58 | protected $translations; |
||
59 | |||
60 | /** |
||
61 | * @var \App\Entity\GalleryHasMedia |
||
62 | * |
||
63 | * @ORM\ManyToMany(targetEntity="App\Entity\GalleryHasMedia", cascade={"persist"}) |
||
64 | * @ORM\JoinTable(name="history_galleryHasMedia", |
||
65 | * joinColumns={@ORM\JoinColumn(name="history_id",referencedColumnName="id")}, |
||
66 | * inverseJoinColumns={@ORM\JoinColumn(name="galleryHasMedia_id",referencedColumnName="id")} |
||
67 | * ) |
||
68 | */ |
||
69 | protected $galleryHasMedia; |
||
70 | |||
71 | /** |
||
72 | * @var string |
||
73 | * |
||
74 | * @Assert\NotBlank() |
||
75 | * @Assert\Choice(callback = "getTypes", message = "choose_valid_type") |
||
76 | * @ORM\Column(type="string", length=255) |
||
77 | * @Serializer\Type("string") |
||
78 | * @Serializer\Expose |
||
79 | */ |
||
80 | protected $type; |
||
81 | |||
82 | /** |
||
83 | * @var \Doctrine\Common\Collections\Collection |
||
84 | * |
||
85 | * @Serializer\Expose |
||
86 | * @ORM\OneToMany(targetEntity="App\Entity\Performance", mappedBy="festival", orphanRemoval=true) |
||
87 | */ |
||
88 | protected $performances; |
||
89 | |||
90 | /** |
||
91 | * Constructor |
||
92 | */ |
||
93 | 1 | public function __construct() |
|
94 | { |
||
95 | 1 | parent::__construct(); |
|
96 | 1 | $this->galleryHasMedia = new \Doctrine\Common\Collections\ArrayCollection(); |
|
97 | 1 | } |
|
98 | |||
99 | /** |
||
100 | * Get id |
||
101 | * |
||
102 | * @return integer |
||
103 | */ |
||
104 | 2 | public function getId() |
|
105 | { |
||
106 | 2 | return $this->id; |
|
107 | } |
||
108 | |||
109 | /** |
||
110 | * Unset translations |
||
111 | * |
||
112 | * @return History |
||
113 | */ |
||
114 | 2 | public function unsetTranslations() |
|
115 | { |
||
116 | 2 | $this->translations = null; |
|
117 | |||
118 | 2 | return $this; |
|
119 | } |
||
120 | |||
121 | /** |
||
122 | * Set dateTime |
||
123 | * |
||
124 | * @param \DateTime $dateTime |
||
125 | * @return History |
||
126 | */ |
||
127 | public function setDateTime($dateTime) |
||
128 | { |
||
129 | $this->dateTime = $dateTime; |
||
130 | |||
131 | return $this; |
||
132 | } |
||
133 | |||
134 | /** |
||
135 | * Get dateTime |
||
136 | * |
||
137 | * @return \DateTime |
||
138 | */ |
||
139 | 5 | public function getDateTime() |
|
140 | { |
||
141 | 5 | return $this->dateTime; |
|
142 | } |
||
143 | |||
144 | /** |
||
145 | * @return mixed |
||
146 | */ |
||
147 | 4 | public function getYear() |
|
148 | { |
||
149 | 4 | return $this->getDateTime()->format('Y'); |
|
150 | } |
||
151 | |||
152 | /** |
||
153 | * Add galleryHasMedia |
||
154 | * |
||
155 | * @param \App\Entity\GalleryHasMedia $galleryHasMedia |
||
156 | * @return self |
||
157 | */ |
||
158 | public function addGalleryHasMedia(\App\Entity\GalleryHasMedia $galleryHasMedia) |
||
159 | { |
||
160 | $this->galleryHasMedia[] = $galleryHasMedia; |
||
161 | |||
162 | return $this; |
||
163 | } |
||
164 | |||
165 | /** |
||
166 | * Remove galleryHasMedia |
||
167 | * |
||
168 | * @param \App\Entity\GalleryHasMedia $galleryHasMedia |
||
169 | */ |
||
170 | public function removeGalleryHasMedia(\App\Entity\GalleryHasMedia $galleryHasMedia) |
||
171 | { |
||
172 | $this->galleryHasMedia->removeElement($galleryHasMedia); |
||
0 ignored issues
–
show
|
|||
173 | } |
||
174 | |||
175 | /** |
||
176 | * Get galleryHasMedia |
||
177 | * |
||
178 | * @return \Doctrine\Common\Collections\Collection |
||
179 | */ |
||
180 | 3 | public function getGalleryHasMedia() |
|
181 | { |
||
182 | 3 | return $this->galleryHasMedia; |
|
183 | } |
||
184 | |||
185 | /** |
||
186 | * @return string |
||
187 | */ |
||
188 | 3 | public function getType() |
|
189 | { |
||
190 | 3 | return $this->type; |
|
191 | } |
||
192 | |||
193 | /** |
||
194 | * @param string $type |
||
195 | * @return $this |
||
196 | */ |
||
197 | public function setType($type) |
||
198 | { |
||
199 | $this->type = $type; |
||
200 | |||
201 | return $this; |
||
202 | } |
||
203 | |||
204 | 2 | public static function getTypes() |
|
205 | { |
||
206 | 2 | return ['history' => 'history', 'festival' => 'festival']; |
|
207 | } |
||
208 | } |
||
209 |
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.