votes = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getDate(): ?\DateTimeInterface { return $this->date; } public function setDate(\DateTimeInterface $date): self { $this->date = $date; return $this; } public function getChoiced(): ?bool { return $this->choiced; } public function setChoiced(bool $choiced): self { $this->choiced = $choiced; return $this; } /** * @return Collection|Vote[] */ public function getVotes(): Collection { return $this->votes; } public function addVote(Vote $vote): self { if (!$this->votes->contains($vote)) { $this->votes[] = $vote; $vote->setOption($this); } return $this; } public function removeVote(Vote $vote): self { if ($this->votes->removeElement($vote)) { // set the owning side to null (unless already changed) if ($vote->getOption() === $this) { $vote->setOption(null); } } return $this; } public function getSurvey(): ?Survey { return $this->survey; } public function setSurvey(?Survey $survey): self { $this->survey = $survey; return $this; } }