geekhub-php /
CheTheatre
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 Doctrine\Common\Collections\ArrayCollection; |
||
| 6 | use Doctrine\ORM\Mapping as ORM; |
||
| 7 | use Gedmo\Mapping\Annotation as Gedmo; |
||
| 8 | use Gedmo\Blameable\Traits\BlameableEntity; |
||
| 9 | use Symfony\Component\Validator\Constraints as Assert; |
||
| 10 | use App\Traits\TimestampableTrait; |
||
| 11 | use App\Traits\DeletedByTrait; |
||
| 12 | use JMS\Serializer\Annotation\ExclusionPolicy; |
||
| 13 | use JMS\Serializer\Annotation\Expose; |
||
| 14 | use JMS\Serializer\Annotation\Type; |
||
| 15 | use JMS\Serializer\Annotation\SerializedName; |
||
| 16 | use Sonata\TranslationBundle\Model\Gedmo\TranslatableInterface; |
||
| 17 | use Sonata\TranslationBundle\Model\Gedmo\AbstractPersonalTranslatable; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @ORM\Table(name="employees") |
||
| 21 | * @ORM\Entity(repositoryClass="App\Repository\EmployeeRepository") |
||
| 22 | * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false) |
||
| 23 | * @Gedmo\TranslationEntity(class="App\Entity\Translations\EmployeeTranslation") |
||
| 24 | * @ExclusionPolicy("all") |
||
| 25 | */ |
||
| 26 | class Employee extends AbstractPersonalTranslatable implements TranslatableInterface |
||
| 27 | { |
||
| 28 | use TimestampableTrait, BlameableEntity, DeletedByTrait; |
||
| 29 | |||
| 30 | const POSITION_ACTOR = 'actor'; |
||
| 31 | const POSITION_ACTRESS = 'actress'; |
||
| 32 | const POSITION_THEATRE_DIRECTOR = 'theatre_director'; // |
||
| 33 | const POSITION_THEATRE_DIRECTOR_ART_DIRECTOR = 'theatre_director_art_director'; // |
||
| 34 | const POSITION_ACTING_ARTISTIC_DIRECTOR = 'acting_artistic_director'; // |
||
| 35 | const POSITION_PRODUCTION_DIRECTOR = 'production_director'; |
||
| 36 | const POSITION_MAIN_ARTIST = 'main_artist'; |
||
| 37 | const POSITION_COSTUMER = 'costumer'; |
||
| 38 | const POSITION_ARTISTIC_DIRECTOR = 'artistic_director'; |
||
| 39 | const POSITION_MAIN_CHOREOGPAPHER = 'main_choreographer'; |
||
| 40 | const POSITION_HEAD_OF_THE_LITERARY_AND_DRAMATIC_PART = 'head_of_the_literary_and_dramatic_part'; |
||
| 41 | const POSITION_CONDUCTOR = 'conductor'; |
||
| 42 | const POSITION_ACCOMPANIST = 'accompanist'; |
||
| 43 | const POSITION_HEAD_CHOREOGRAPHER = 'head_choreographer'; |
||
| 44 | const POSITION_ART_DIRECTOR = 'art_director'; |
||
| 45 | const POSITION_STAGED = 'staged'; |
||
| 46 | const POSITION_ACCOMPANIST_SINGING_CLASS = 'accompanist_singing_class'; |
||
| 47 | const POSITION_HEAD_OF_TROUPE = 'head_of_troupe'; |
||
| 48 | const POSITION_HEAD_OF_ARTISTIC_STAGING_PART = 'head_of_artistic_staging_part'; |
||
| 49 | const POSITION_STAGE_MANAGER = 'stage_manager'; |
||
| 50 | const POSITION_LEADING_ARTIST_SCENE = 'leading_artist_scene'; |
||
| 51 | const POSITION_ACTOR_HIGHER_CATEGORY = 'actor_higher_category'; |
||
| 52 | const POSITION_ACTOR_FIRST_CATEGORY = 'actor_first_category'; |
||
| 53 | const POSITION_ACTOR_SINGER_SOLOIST_HIGHER_CATEGORY = 'actor_singer_soloist_higher_category'; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @var integer |
||
| 57 | * @ORM\Column(name="id", type="integer") |
||
| 58 | * @ORM\Id |
||
| 59 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 60 | */ |
||
| 61 | private $id; |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @var string |
||
| 65 | * @Gedmo\Translatable |
||
| 66 | * @Assert\NotBlank() |
||
| 67 | * @ORM\Column(type="string", length=255) |
||
| 68 | * @Type("string") |
||
| 69 | * @Expose |
||
| 70 | */ |
||
| 71 | private $firstName; |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @var string |
||
| 75 | * @Gedmo\Translatable |
||
| 76 | * @Assert\NotBlank() |
||
| 77 | * @ORM\Column(type="string", length=255) |
||
| 78 | * @Type("string") |
||
| 79 | * @Expose |
||
| 80 | */ |
||
| 81 | private $lastName; |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @var /Datetime |
||
| 85 | * @Assert\NotBlank() |
||
| 86 | * @ORM\Column(type="datetime") |
||
| 87 | * @Type("DateTime") |
||
| 88 | * @Expose |
||
| 89 | */ |
||
| 90 | private $dob; |
||
| 91 | |||
| 92 | /** |
||
| 93 | * @var string |
||
| 94 | * @ORM\Column(type="string", length=255) |
||
| 95 | * @Type("string") |
||
| 96 | * @Expose |
||
| 97 | */ |
||
| 98 | private $position; |
||
| 99 | |||
| 100 | /** |
||
| 101 | * @var string |
||
| 102 | * @Gedmo\Translatable |
||
| 103 | * @ORM\Column(type="text", nullable=true) |
||
| 104 | * @Type("string") |
||
| 105 | * @Expose |
||
| 106 | */ |
||
| 107 | private $biography; |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @var Role[] |
||
| 111 | * |
||
| 112 | * @ORM\OneToMany(targetEntity="App\Entity\Role", mappedBy="employee", cascade={"persist", "remove"}, orphanRemoval=true) |
||
| 113 | */ |
||
| 114 | private $roles; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @var \App\Entity\GalleryHasMedia |
||
| 118 | * |
||
| 119 | * @ORM\ManyToMany(targetEntity="App\Entity\GalleryHasMedia", cascade={"persist"}) |
||
| 120 | * @ORM\JoinTable(name="employee_galleryHasMedia", |
||
| 121 | * joinColumns={@ORM\JoinColumn(name="employee_id",referencedColumnName="id")}, |
||
| 122 | * inverseJoinColumns={@ORM\JoinColumn(name="galleryHasMedia_id",referencedColumnName="id")} |
||
| 123 | * ) |
||
| 124 | */ |
||
| 125 | private $galleryHasMedia; |
||
| 126 | |||
| 127 | /** |
||
| 128 | * @var array |
||
| 129 | * @Expose |
||
| 130 | * @Type("array") |
||
| 131 | * @SerializedName("gallery") |
||
| 132 | */ |
||
| 133 | public $galleryHasMediaThumbnails; |
||
| 134 | |||
| 135 | /** |
||
| 136 | * @Gedmo\Slug(fields={"firstName", "lastName"}) |
||
| 137 | * @ORM\Column(name="slug", type="string", length=255) |
||
| 138 | * @Type("string") |
||
| 139 | * @Expose |
||
| 140 | */ |
||
| 141 | private $slug; |
||
| 142 | |||
| 143 | /** |
||
| 144 | * @var Media |
||
| 145 | * |
||
| 146 | * @ORM\OneToOne(targetEntity="App\Entity\Media", cascade={"persist"}) |
||
| 147 | * @ORM\JoinColumn(name="avatar_id", referencedColumnName="id") |
||
| 148 | */ |
||
| 149 | private $avatar; |
||
| 150 | |||
| 151 | /** |
||
| 152 | * @var array |
||
| 153 | * @Expose |
||
| 154 | * @Type("array") |
||
| 155 | * @SerializedName("avatar") |
||
| 156 | */ |
||
| 157 | public $avatarThumbnails; |
||
| 158 | |||
| 159 | /** |
||
| 160 | * @var ArrayCollection |
||
| 161 | * |
||
| 162 | * @ORM\OneToMany( |
||
| 163 | * targetEntity="App\Entity\Translations\EmployeeTranslation", |
||
| 164 | * mappedBy="object", |
||
| 165 | * cascade={"persist", "remove"} |
||
| 166 | * ) |
||
| 167 | */ |
||
| 168 | protected $translations; |
||
| 169 | |||
| 170 | /** |
||
| 171 | * Constructor |
||
| 172 | */ |
||
| 173 | 1 | public function __construct() |
|
| 174 | { |
||
| 175 | 1 | parent::__construct(); |
|
| 176 | 1 | $this->roles = new \Doctrine\Common\Collections\ArrayCollection(); |
|
| 177 | 1 | $this->galleryHasMedia = new \Doctrine\Common\Collections\ArrayCollection(); |
|
| 178 | 1 | } |
|
| 179 | |||
| 180 | /** |
||
| 181 | * Unset translations |
||
| 182 | * |
||
| 183 | * @return Employee |
||
| 184 | */ |
||
| 185 | 5 | public function unsetTranslations() |
|
| 186 | { |
||
| 187 | 5 | $this->translations = null; |
|
| 188 | |||
| 189 | 5 | return $this; |
|
| 190 | } |
||
| 191 | |||
| 192 | /** |
||
| 193 | * Get id |
||
| 194 | * |
||
| 195 | * @return integer |
||
| 196 | */ |
||
| 197 | 2 | public function getId() |
|
| 198 | { |
||
| 199 | 2 | return $this->id; |
|
| 200 | } |
||
| 201 | |||
| 202 | /** |
||
| 203 | * Get firstName |
||
| 204 | * |
||
| 205 | * @return string |
||
| 206 | */ |
||
| 207 | 6 | public function getFirstName() |
|
| 208 | { |
||
| 209 | 6 | return $this->firstName; |
|
| 210 | } |
||
| 211 | |||
| 212 | /** |
||
| 213 | * Set firstName |
||
| 214 | * |
||
| 215 | * @param string $firstName |
||
| 216 | * @return Employee |
||
| 217 | */ |
||
| 218 | public function setFirstName($firstName) |
||
| 219 | { |
||
| 220 | $this->firstName = $firstName; |
||
| 221 | |||
| 222 | return $this; |
||
| 223 | } |
||
| 224 | |||
| 225 | /** |
||
| 226 | * Get lastName |
||
| 227 | * |
||
| 228 | * @return string |
||
| 229 | */ |
||
| 230 | 6 | public function getLastName() |
|
| 231 | { |
||
| 232 | 6 | return $this->lastName; |
|
| 233 | } |
||
| 234 | |||
| 235 | /** |
||
| 236 | * Set lastName |
||
| 237 | * |
||
| 238 | * @param string $lastName |
||
| 239 | * @return Employee |
||
| 240 | */ |
||
| 241 | public function setLastName($lastName) |
||
| 242 | { |
||
| 243 | $this->lastName = $lastName; |
||
| 244 | |||
| 245 | return $this; |
||
| 246 | } |
||
| 247 | |||
| 248 | /** |
||
| 249 | * Get dob |
||
| 250 | * |
||
| 251 | * @return \DateTime |
||
| 252 | */ |
||
| 253 | 3 | public function getDob() |
|
| 254 | { |
||
| 255 | 3 | return $this->dob; |
|
| 256 | } |
||
| 257 | |||
| 258 | /** |
||
| 259 | * Set dob |
||
| 260 | * |
||
| 261 | * @param \DateTime $dob |
||
| 262 | * @return Employee |
||
| 263 | */ |
||
| 264 | public function setDob($dob) |
||
| 265 | { |
||
| 266 | $this->dob = $dob; |
||
| 267 | |||
| 268 | return $this; |
||
| 269 | } |
||
| 270 | |||
| 271 | /** |
||
| 272 | * Get position |
||
| 273 | * |
||
| 274 | * @return string |
||
| 275 | */ |
||
| 276 | 7 | public function getPosition() |
|
| 277 | { |
||
| 278 | 7 | return $this->position; |
|
| 279 | } |
||
| 280 | |||
| 281 | /** |
||
| 282 | * Set position |
||
| 283 | * |
||
| 284 | * @param string $position |
||
| 285 | * @return Employee |
||
| 286 | */ |
||
| 287 | 4 | public function setPosition($position) |
|
| 288 | { |
||
| 289 | 4 | $this->position = $position; |
|
| 290 | |||
| 291 | 4 | return $this; |
|
| 292 | } |
||
| 293 | |||
| 294 | /** |
||
| 295 | * Get biography |
||
| 296 | * |
||
| 297 | * @return string |
||
| 298 | */ |
||
| 299 | 1 | public function getBiography() |
|
| 300 | { |
||
| 301 | 1 | return $this->biography; |
|
| 302 | } |
||
| 303 | |||
| 304 | /** |
||
| 305 | * Set biography |
||
| 306 | * |
||
| 307 | * @param string $biography |
||
| 308 | * @return Employee |
||
| 309 | */ |
||
| 310 | public function setBiography($biography) |
||
| 311 | { |
||
| 312 | $this->biography = $biography; |
||
| 313 | |||
| 314 | return $this; |
||
| 315 | } |
||
| 316 | |||
| 317 | /** |
||
| 318 | * Add role |
||
| 319 | * |
||
| 320 | * @param \App\Entity\Role $role |
||
| 321 | * @return Employee |
||
| 322 | */ |
||
| 323 | public function addRole(\App\Entity\Role $role) |
||
| 324 | { |
||
| 325 | $this->roles[] = $role; |
||
| 326 | |||
| 327 | return $this; |
||
| 328 | } |
||
| 329 | |||
| 330 | /** |
||
| 331 | * Remove role |
||
| 332 | * |
||
| 333 | * @param \App\Entity\Role $role |
||
| 334 | */ |
||
| 335 | public function removeRole(\App\Entity\Role $role) |
||
| 336 | { |
||
| 337 | $this->roles->removeElement($role); |
||
| 338 | } |
||
| 339 | |||
| 340 | /** |
||
| 341 | * Get roles |
||
| 342 | * |
||
| 343 | * @return \Doctrine\Common\Collections\Collection |
||
| 344 | */ |
||
| 345 | 3 | public function getRoles() |
|
| 346 | { |
||
| 347 | 3 | return $this->roles; |
|
| 348 | } |
||
| 349 | |||
| 350 | 4 | public function __toString() |
|
| 351 | { |
||
| 352 | 4 | return $this->getFirstName().' '.$this->getLastName(); |
|
| 353 | } |
||
| 354 | |||
| 355 | /** |
||
| 356 | * Get slug |
||
| 357 | * |
||
| 358 | * @return string |
||
| 359 | */ |
||
| 360 | 2 | public function getSlug() |
|
| 361 | { |
||
| 362 | 2 | return $this->slug; |
|
| 363 | } |
||
| 364 | |||
| 365 | /** |
||
| 366 | * Set slug |
||
| 367 | * |
||
| 368 | * @param string $slug |
||
| 369 | * @return Employee |
||
| 370 | */ |
||
| 371 | public function setSlug($slug) |
||
| 372 | { |
||
| 373 | $this->slug = $slug; |
||
| 374 | |||
| 375 | return $this; |
||
| 376 | } |
||
| 377 | |||
| 378 | /** |
||
| 379 | * @return Media |
||
| 380 | */ |
||
| 381 | 7 | public function getAvatar() |
|
| 382 | { |
||
| 383 | 7 | return $this->avatar; |
|
| 384 | } |
||
| 385 | |||
| 386 | /** |
||
| 387 | * @param mixed $avatar |
||
| 388 | * @return $this |
||
| 389 | */ |
||
| 390 | public function setAvatar($avatar) |
||
| 391 | { |
||
| 392 | $this->avatar = $avatar; |
||
| 393 | |||
| 394 | return $this; |
||
| 395 | } |
||
| 396 | |||
| 397 | 3 | public static function getPositions() |
|
| 398 | { |
||
| 399 | return [ |
||
| 400 | 3 | self::POSITION_ACTOR => 'actor', |
|
| 401 | 3 | self::POSITION_ACTRESS => 'actress', |
|
| 402 | 3 | self::POSITION_THEATRE_DIRECTOR => 'theatre_director', |
|
| 403 | 3 | self::POSITION_THEATRE_DIRECTOR_ART_DIRECTOR => 'theatre_director_art_director', |
|
| 404 | 3 | self::POSITION_ACTING_ARTISTIC_DIRECTOR => 'acting_artistic_director', |
|
| 405 | 3 | self::POSITION_PRODUCTION_DIRECTOR => 'production_director', |
|
| 406 | 3 | self::POSITION_MAIN_ARTIST => 'main_artist', |
|
| 407 | 3 | self::POSITION_COSTUMER => 'costumer', |
|
| 408 | 3 | self::POSITION_ARTISTIC_DIRECTOR => 'artistic_director', |
|
| 409 | 3 | self::POSITION_MAIN_CHOREOGPAPHER => 'main_choreographer', |
|
| 410 | 3 | self::POSITION_HEAD_OF_THE_LITERARY_AND_DRAMATIC_PART => 'head_of_the_literary_and_dramatic_part', |
|
| 411 | 3 | self::POSITION_CONDUCTOR => 'conductor', |
|
| 412 | 3 | self::POSITION_ACCOMPANIST => 'accompanist', |
|
| 413 | 3 | self::POSITION_HEAD_CHOREOGRAPHER => 'head_choreographer', |
|
| 414 | 3 | self::POSITION_ART_DIRECTOR => 'art_director', |
|
| 415 | 3 | self::POSITION_STAGED => 'staged', |
|
| 416 | 3 | self::POSITION_ACCOMPANIST_SINGING_CLASS => 'accompanist_singing_class', |
|
| 417 | 3 | self::POSITION_HEAD_OF_TROUPE => 'head_of_troupe', |
|
| 418 | 3 | self::POSITION_HEAD_OF_ARTISTIC_STAGING_PART => 'head_of_artistic_staging_part', |
|
| 419 | 3 | self::POSITION_STAGE_MANAGER => 'stage_manager', |
|
| 420 | 3 | self::POSITION_LEADING_ARTIST_SCENE => 'leading_artist_scene', |
|
| 421 | 3 | self::POSITION_ACTOR_HIGHER_CATEGORY => 'actor_higher_category', |
|
| 422 | 3 | self::POSITION_ACTOR_FIRST_CATEGORY => 'actor_first_category', |
|
| 423 | 3 | self::POSITION_ACTOR_SINGER_SOLOIST_HIGHER_CATEGORY => 'actor_singer_soloist_higher_category', |
|
| 424 | ]; |
||
| 425 | } |
||
| 426 | |||
| 427 | /** |
||
| 428 | * Add galleryHasMedia |
||
| 429 | * |
||
| 430 | * @param \App\Entity\GalleryHasMedia $galleryHasMedia |
||
| 431 | * @return Employee |
||
| 432 | */ |
||
| 433 | public function addGalleryHasMedia(\App\Entity\GalleryHasMedia $galleryHasMedia) |
||
| 434 | { |
||
| 435 | $this->galleryHasMedia[] = $galleryHasMedia; |
||
| 436 | |||
| 437 | return $this; |
||
| 438 | } |
||
| 439 | |||
| 440 | /** |
||
| 441 | * Remove galleryHasMedia |
||
| 442 | * |
||
| 443 | * @param \App\Entity\GalleryHasMedia $galleryHasMedia |
||
| 444 | */ |
||
| 445 | public function removeGalleryHasMedia(\App\Entity\GalleryHasMedia $galleryHasMedia) |
||
| 446 | { |
||
| 447 | $this->galleryHasMedia->removeElement($galleryHasMedia); |
||
|
0 ignored issues
–
show
|
|||
| 448 | } |
||
| 449 | |||
| 450 | /** |
||
| 451 | * Get galleryHasMedia |
||
| 452 | * |
||
| 453 | * @return \Doctrine\Common\Collections\Collection |
||
| 454 | */ |
||
| 455 | 5 | public function getGalleryHasMedia() |
|
| 456 | { |
||
| 457 | 5 | return $this->galleryHasMedia; |
|
| 458 | } |
||
| 459 | } |
||
| 460 |
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.