X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FSiteCredential.php;h=ac714359d6b817b5fc7a901ae84dc1e85cac52e6;hb=927c9e796ff6fad2bf82a965234f52932cdee657;hp=4d6557c59986845bd6046d6268db8eb94372a203;hpb=b5d7eb148c4cd62ff187b08765f0c13c7d330fcf;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/SiteCredential.php b/src/Wallabag/CoreBundle/Entity/SiteCredential.php index 4d6557c5..ac714359 100644 --- a/src/Wallabag/CoreBundle/Entity/SiteCredential.php +++ b/src/Wallabag/CoreBundle/Entity/SiteCredential.php @@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; +use Wallabag\CoreBundle\Helper\EntityTimestampsTrait; use Wallabag\UserBundle\Entity\User; /** @@ -15,6 +16,8 @@ use Wallabag\UserBundle\Entity\User; */ class SiteCredential { + use EntityTimestampsTrait; + /** * @var int * @@ -182,14 +185,4 @@ class SiteCredential { return $this->user; } - - /** - * @ORM\PrePersist - */ - public function timestamps() - { - if (null === $this->createdAt) { - $this->createdAt = new \DateTime(); - } - } }