Updated DateTime types.
This commit is contained in:
@@ -38,9 +38,9 @@ class RoomPrice
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDate(): ?\DateTime
|
||||
public function getDate(): ?\DateTimeImmutable
|
||||
{
|
||||
return new \DateTime($this->date);
|
||||
return new \DateTimeImmutable($this->date);
|
||||
}
|
||||
|
||||
public function getDateString(): ?string
|
||||
@@ -48,7 +48,7 @@ class RoomPrice
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function setDate(\DateTime $date): static
|
||||
public function setDate(\DateTimeInterface $date): static
|
||||
{
|
||||
$this->date = $date->format('Y-m-d');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user