workingDay; } public function setWorkingDay(DateTime $workingDay): static { $this->workingDay = $workingDay; return $this; } public function getWorkingTime(): ?DateInterval { return $this->workingTime; } public function setWorkingTime(DateInterval $workingTime): static { $this->workingTime = $workingTime; return $this; } public function isHomeOffice(): bool { return $this->isHomeOffice; } public function setIsHomeOffice(bool $isHomeOffice): WorkingHours { $this->isHomeOffice = $isHomeOffice; return $this; } /** * @return array */ #[ArrayShape(['workingDay' => "string", 'workingTime' => "string", 'isHomeOffice' => "boolean"])] public function jsonSerialize(): array { return [ 'workingDay' => $this->getWorkingDay()->format('Y-m-d'), 'workingTime' => $this->getWorkingTime()->format('%H:%I:%S'), 'isHomeOffice' => $this->isHomeOffice(), ]; } }