for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Entity\Traits;
use Doctrine\ORM\Mapping as ORM;
trait EntityTimestampableTrait
{
/**
* @ORM\Column(type="datetime", nullable=true, options={"default"="CURRENT_TIMESTAMP"})
*/
private $createdAt;
private $updatedAt;
public function getCreatedAt(): ?\DateTimeInterface
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
$this->createdAt = $createdAt;
return $this;
public function getUpdatedAt(): ?\DateTimeInterface
return $this->updatedAt;
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
$this->updatedAt = $updatedAt;