results = new ArrayCollection(); } public function addResult(Result $result): self { if (!$this->results->contains($result)) { $this->results[] = $result; } return $this; } public function getAccompanyingPeriodWork(): ?AccompanyingPeriodWork { return $this->accompanyingPeriodWork; } public function getGoal(): ?Goal { return $this->goal; } public function getId(): ?int { return $this->id; } public function getNote(): ?string { return $this->note; } /** * @return Collection|Result[] */ public function getResults(): Collection { return $this->results; } public function removeResult(Result $result): self { $this->results->removeElement($result); return $this; } public function setAccompanyingPeriodWork(?AccompanyingPeriodWork $accompanyingPeriodWork): self { if ( $this->accompanyingPeriodWork instanceof AccompanyingPeriodWork && $accompanyingPeriodWork !== $this->accompanyingPeriodWork && null !== $accompanyingPeriodWork ) { throw new LogicException('Change accompanying period work is not allowed'); } $this->accompanyingPeriodWork = $accompanyingPeriodWork; return $this; } public function setGoal(?Goal $goal): self { $this->goal = $goal; return $this; } public function setNote(string $note): self { $this->note = $note; return $this; } }