for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\PhotoRepository")
*/
class Photo
{
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
private $id;
* @ORM\ManyToOne(targetEntity="App\Entity\Property", inversedBy="photos")
* @ORM\JoinColumn(nullable=true)
private $property;
* @ORM\Column(type="string", length=255)
*
* @Assert\File(mimeTypes={ "image/*" })
private $photo;
* @ORM\Column(type="integer", nullable=true)
private $sort_order;
public function getId(): ?int
return $this->id;
}
public function getProperty(): ?Property
return $this->property;
public function setProperty(?Property $property): self
$this->property = $property;
return $this;
public function getPhoto()
return $this->photo;
public function setPhoto($photo)
$this->photo = $photo;
public function getSortOrder(): ?int
return $this->sort_order;
public function setSortOrder(?int $sort_order): self
$this->sort_order = $sort_order;