Skip to content

Commit

Permalink
Make TimestampableEntity getter type hints nullable (#2531)
Browse files Browse the repository at this point in the history
  • Loading branch information
villermen committed Jun 20, 2023
1 parent 95bc3c8 commit 9c46ada
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/Timestampable/Traits/Timestampable.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
trait Timestampable
{
/**
* @var \DateTime
* @var \DateTime|null
*/
protected $createdAt;

/**
* @var \DateTime
* @var \DateTime|null
*/
protected $updatedAt;

Expand All @@ -41,7 +41,7 @@ public function setCreatedAt(\DateTime $createdAt)
/**
* Returns createdAt.
*
* @return \DateTime
* @return \DateTime|null
*/
public function getCreatedAt()
{
Expand All @@ -63,7 +63,7 @@ public function setUpdatedAt(\DateTime $updatedAt)
/**
* Returns updatedAt.
*
* @return \DateTime
* @return \DateTime|null
*/
public function getUpdatedAt()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Timestampable/Traits/TimestampableDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
trait TimestampableDocument
{
/**
* @var \DateTime
* @var \DateTime|null
* @Gedmo\Timestampable(on="create")
* @ODM\Field(type="date")
*/
Expand All @@ -30,7 +30,7 @@ trait TimestampableDocument
protected $createdAt;

/**
* @var \DateTime
* @var \DateTime|null
* @Gedmo\Timestampable(on="update")
* @ODM\Field(type="date")
*/
Expand All @@ -53,7 +53,7 @@ public function setCreatedAt(\DateTime $createdAt)
/**
* Returns createdAt.
*
* @return \DateTime
* @return \DateTime|null
*/
public function getCreatedAt()
{
Expand All @@ -75,7 +75,7 @@ public function setUpdatedAt(\DateTime $updatedAt)
/**
* Returns updatedAt.
*
* @return \Datetime
* @return \Datetime|null
*/
public function getUpdatedAt()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Timestampable/Traits/TimestampableEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
trait TimestampableEntity
{
/**
* @var \DateTime
* @var \DateTime|null
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime")
*/
Expand All @@ -30,7 +30,7 @@ trait TimestampableEntity
protected $createdAt;

/**
* @var \DateTime
* @var \DateTime|null
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="datetime")
*/
Expand All @@ -53,7 +53,7 @@ public function setCreatedAt(\DateTime $createdAt)
/**
* Returns createdAt.
*
* @return \DateTime
* @return \DateTime|null
*/
public function getCreatedAt()
{
Expand All @@ -75,7 +75,7 @@ public function setUpdatedAt(\DateTime $updatedAt)
/**
* Returns updatedAt.
*
* @return \DateTime
* @return \DateTime|null
*/
public function getUpdatedAt()
{
Expand Down

0 comments on commit 9c46ada

Please sign in to comment.