aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity/SiteCredential.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/SiteCredential.php')
-rw-r--r--src/Wallabag/CoreBundle/Entity/SiteCredential.php13
1 files changed, 3 insertions, 10 deletions
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;
4 4
5use Doctrine\ORM\Mapping as ORM; 5use Doctrine\ORM\Mapping as ORM;
6use Symfony\Component\Validator\Constraints as Assert; 6use Symfony\Component\Validator\Constraints as Assert;
7use Wallabag\CoreBundle\Helper\EntityTimestampsTrait;
7use Wallabag\UserBundle\Entity\User; 8use Wallabag\UserBundle\Entity\User;
8 9
9/** 10/**
@@ -15,6 +16,8 @@ use Wallabag\UserBundle\Entity\User;
15 */ 16 */
16class SiteCredential 17class SiteCredential
17{ 18{
19 use EntityTimestampsTrait;
20
18 /** 21 /**
19 * @var int 22 * @var int
20 * 23 *
@@ -182,14 +185,4 @@ class SiteCredential
182 { 185 {
183 return $this->user; 186 return $this->user;
184 } 187 }
185
186 /**
187 * @ORM\PrePersist
188 */
189 public function timestamps()
190 {
191 if (null === $this->createdAt) {
192 $this->createdAt = new \DateTime();
193 }
194 }
195} 188}