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 App\Entity\Traits\EntityIdTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\FeatureRepository")
*/
class Feature
{
use EntityIdTrait;
* @ORM\Column(type="string", length=255)
private ?string $name;
* @ORM\ManyToMany(targetEntity="App\Entity\Property", mappedBy="features")
private $properties;
* @ORM\Column(type="text", nullable=true)
private ?string $icon;
public function __construct()
$this->properties = new ArrayCollection();
}
public function getName(): ?string
return $this->name;
public function setName(string $name): self
$this->name = $name;
return $this;
public function getProperties(): Collection
return $this->properties;
public function addProperty(Property $property): self
if (!$this->properties->contains($property)) {
$this->properties[] = $property;
$property->addFeature($this);
public function removeProperty(Property $property): self
if ($this->properties->contains($property)) {
$this->properties->removeElement($property);
$property->removeFeature($this);
public function getIcon(): ?string
return $this->icon;
public function setIcon(?string $icon): self
$this->icon = $icon;