forked from GNUsocial/gnu-social
[DATABASE][AUTOCODE] Update autocode to use \DateTimeInterface instead of DateTime
This commit is contained in:
@@ -41,8 +41,8 @@ class NoticeSource
|
||||
private string $name;
|
||||
private string $url;
|
||||
private int $notice_id;
|
||||
private DateTime $created;
|
||||
private DateTime $modified;
|
||||
private \DateTimeInterface $created;
|
||||
private \DateTimeInterface $modified;
|
||||
|
||||
public function setCode(string $code): self
|
||||
{
|
||||
@@ -84,22 +84,22 @@ class NoticeSource
|
||||
return $this->notice_id;
|
||||
}
|
||||
|
||||
public function setCreated(DateTime $created): self
|
||||
public function setCreated(\DateTimeInterface $created): self
|
||||
{
|
||||
$this->created = $created;
|
||||
return $this;
|
||||
}
|
||||
public function getCreated(): DateTime
|
||||
public function getCreated(): \DateTimeInterface
|
||||
{
|
||||
return $this->created;
|
||||
}
|
||||
|
||||
public function setModified(DateTime $modified): self
|
||||
public function setModified(\DateTimeInterface $modified): self
|
||||
{
|
||||
$this->modified = $modified;
|
||||
return $this;
|
||||
}
|
||||
public function getModified(): DateTime
|
||||
public function getModified(): \DateTimeInterface
|
||||
{
|
||||
return $this->modified;
|
||||
}
|
||||
|
Reference in New Issue
Block a user