| Total Complexity | 5 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 63.64% |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | trait TimestampedTrait |
||
| 26 | { |
||
| 27 | /** |
||
| 28 | * @ORM\Column(type="date_immutable") |
||
| 29 | * @ApiProperty(writable=false) |
||
| 30 | * @Assert\NotNull() |
||
| 31 | */ |
||
| 32 | private ?DateTimeImmutable $created = null; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @ORM\Column(type="datetime") |
||
| 36 | * @ApiProperty(writable=false) |
||
| 37 | * @Assert\NotNull() |
||
| 38 | */ |
||
| 39 | public ?DateTime $modified = null; |
||
| 40 | |||
| 41 | /** @return static */ |
||
| 42 | 7 | public function setCreated(DateTimeImmutable $created) |
|
| 43 | { |
||
| 44 | 7 | if (!$this->created) { |
|
| 45 | 7 | $this->created = $created; |
|
| 46 | } |
||
| 47 | |||
| 48 | 7 | return $this; |
|
| 49 | } |
||
| 50 | |||
| 51 | public function getCreated(): ?DateTimeImmutable |
||
| 54 | } |
||
| 55 | |||
| 56 | /** @return static */ |
||
| 57 | 7 | public function setModified(DateTime $modified) |
|
| 58 | { |
||
| 59 | 7 | $this->modified = $modified; |
|
| 60 | |||
| 61 | 7 | return $this; |
|
| 62 | } |
||
| 63 | |||
| 64 | public function getModified(): ?DateTime |
||
| 67 | } |
||
| 68 | } |
||
| 69 |