| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | trait TimestampedTrait |
||
| 23 | { |
||
| 24 | private ?DateTimeImmutable $createdAt = null; |
||
| 25 | |||
| 26 | public ?DateTime $modifiedAt = null; |
||
| 27 | |||
| 28 | /** @return static */ |
||
| 29 | public function setCreatedAt(DateTimeImmutable $createdAt) |
||
| 30 | { |
||
| 31 | if (!$this->createdAt) { |
||
| 32 | $this->createdAt = $createdAt; |
||
| 33 | } |
||
| 34 | |||
| 35 | return $this; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getCreatedAt(): ?DateTimeImmutable |
||
| 39 | { |
||
| 40 | return $this->createdAt; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** @return static */ |
||
| 44 | public function setModifiedAt(DateTime $modifiedAt) |
||
| 45 | { |
||
| 46 | $this->modifiedAt = $modifiedAt; |
||
| 47 | |||
| 48 | return $this; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function getModifiedAt(): ?DateTime |
||
| 54 | } |
||
| 55 | } |
||
| 56 |