for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Entity;
use App\Repository\TaskRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\Ignore;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=TaskRepository::class)
*/
class Task
{
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
* @ORM\Column(type="integer")
* @Ignore()
private int $id;
* @ORM\Column(type="string", length=255)
* @Assert\NotBlank(normalizer = "trim")
* @Groups({"request"})
private string $name;
* @ORM\Column(type="text", nullable=true)
private ?string $description = null;
* @ORM\ManyToOne(targetEntity="ToDo", inversedBy="tasks")
* @ORM\JoinColumn(nullable=false)
private ?ToDo $todo;
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;
public function getDescription(): ?string
return $this->description;
public function setDescription(?string $description): self
$this->description = $description;
public function getTodo(): ?ToDo
return $this->todo;
public function setTodo(?ToDo $todo): self
$this->todo = $todo;