diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/SiteCredential.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/SiteCredential.php | 13 |
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 | ||
5 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use Symfony\Component\Validator\Constraints as Assert; | 6 | use Symfony\Component\Validator\Constraints as Assert; |
7 | use Wallabag\CoreBundle\Helper\EntityTimestampsTrait; | ||
7 | use Wallabag\UserBundle\Entity\User; | 8 | use Wallabag\UserBundle\Entity\User; |
8 | 9 | ||
9 | /** | 10 | /** |
@@ -15,6 +16,8 @@ use Wallabag\UserBundle\Entity\User; | |||
15 | */ | 16 | */ |
16 | class SiteCredential | 17 | class 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 | } |