diff --git a/src/PreciseTime.php b/src/PreciseTime.php index f155b88..bfdd5d8 100644 --- a/src/PreciseTime.php +++ b/src/PreciseTime.php @@ -66,7 +66,7 @@ public function diff(parent $time): DateInterval return $this->toDateTime()->diff($time->toDateTime()); } - public function toDateTime(DateTimeInterface $date = null): DateTimeInterface + public function toDateTime(?DateTimeInterface $date = null): DateTimeInterface { return $date ? $this->copyDateTime($date)->modify($this->format('H:i:s.u'))