setStartDate(new DateTimeImmutable('today')); } public function getCenters(): array { if (null !== $this->getPerson()) { return [$this->getPerson()->getCenter()]; } return $this->getHousehold()->getCurrentPersons()->map(static fn (Person $p) => $p->getCenter())->toArray(); } /** * Get id. * * @return int */ public function getId() { return $this->id; } public function getResource(): ?ResourceKind { return $this->resource; } public function isCharge(): bool { return false; } public function isResource(): bool { return true; } public function setResource(?ResourceKind $resource): self { $this->resource = $resource; return $this; } }