for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CategoryRepository")
*/
class Category
{
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
private $id;
* @ORM\Column(type="string", length=255)
private $Name;
* @ORM\OneToMany(targetEntity="App\Entity\Trick", mappedBy="category")
private $tricks;
public function __construct()
$this->tricks = new ArrayCollection();
}
public function getId(): ?int
return $this->id;
public function getName(): ?string
return $this->Name;
public function setName(string $Name): self
$this->Name = $Name;
return $this;
* @return Collection|Trick[]
public function getTricks(): Collection
return $this->tricks;
public function addTrick(Trick $trick): self
if (!$this->tricks->contains($trick)) {
$this->tricks[] = $trick;
$trick->setCategory($this);
public function removeTrick(Trick $trick): self
if ($this->tricks->contains($trick)) {
$this->tricks->removeElement($trick);
// set the owning side to null (unless already changed)
if ($trick->getCategory() === $this) {
$trick->setCategory(null);
public function __toString(){