public function setHour(int $hour) : self { if ($hour < 0 || $hour > 24) { throw new ComposerException('Hour out of range.', ComposerException::HOUR); } $this->hour = $hour; return $this; }