mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: split in functions
This commit is contained in:
@@ -292,12 +292,14 @@ class Domain
|
||||
|
||||
#[ORM\PrePersist]
|
||||
#[ORM\PreUpdate]
|
||||
public function updateTimestamps(): void
|
||||
public function updateTimestamps(): static
|
||||
{
|
||||
$this->setUpdatedAt(new \DateTimeImmutable('now'));
|
||||
if (null === $this->getCreatedAt()) {
|
||||
$this->setCreatedAt($this->getUpdatedAt());
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
private function setUpdatedAt(?\DateTimeImmutable $updatedAt): void
|
||||
|
||||
Reference in New Issue
Block a user