*/ #[ORM\OneToMany(targetEntity: Stats::class, mappedBy: 'cityFollowUps')] private Collection $stats; public function __construct() { $this->stats = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } public function getMeasure(): ?float { return $this->measure; } public function setMeasure(float $measure): static { $this->measure = $measure; return $this; } public function getDate(): ?\DateTime { return $this->date; } public function setDate(\DateTime $date): static { $this->date = $date; return $this; } /** * @return Collection */ public function getStats(): Collection { return $this->stats; } public function addStat(Stats $stat): static { if (!$this->stats->contains($stat)) { $this->stats->add($stat); $stat->setCityFollowUps($this); } return $this; } public function removeStat(Stats $stat): static { if ($this->stats->removeElement($stat)) { // set the owning side to null (unless already changed) if ($stat->getCityFollowUps() === $this) { $stat->setCityFollowUps(null); } } return $this; } }