| Total Complexity | 9 |
| Total Lines | 88 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CommentWithPostDto |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @param Ulid $id |
||
| 12 | * @param string $author |
||
| 13 | * @param string $body |
||
| 14 | * @param Ulid|null $parentId |
||
| 15 | * @param \DateTime $createdAt |
||
| 16 | * @param Ulid $postId |
||
| 17 | * @param string $postTitle |
||
| 18 | * @param array $postTags |
||
| 19 | */ |
||
| 20 | public function __construct( |
||
| 21 | private Ulid $id, |
||
| 22 | 2 | private string $author, |
|
| 23 | private string $body, |
||
| 24 | private ?Ulid $parentId, |
||
| 25 | private \DateTime $createdAt, |
||
| 26 | private Ulid $postId, |
||
| 27 | private string $postTitle, |
||
| 28 | private array $postTags |
||
| 29 | ) |
||
| 30 | { |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return Ulid |
||
| 35 | 2 | */ |
|
| 36 | public function getId(): Ulid |
||
| 39 | } |
||
| 40 | 2 | ||
| 41 | /** |
||
| 42 | 2 | * @return string |
|
| 43 | */ |
||
| 44 | public function getAuthor(): string |
||
| 45 | { |
||
| 46 | return $this->author; |
||
| 47 | } |
||
| 48 | 2 | ||
| 49 | /** |
||
| 50 | 2 | * @return string |
|
| 51 | */ |
||
| 52 | public function getBody(): string |
||
| 53 | { |
||
| 54 | return $this->body; |
||
| 55 | } |
||
| 56 | 2 | ||
| 57 | /** |
||
| 58 | 2 | * @return Ulid|null |
|
| 59 | */ |
||
| 60 | public function getParentId(): ?Ulid |
||
| 63 | } |
||
| 64 | 2 | ||
| 65 | /** |
||
| 66 | 2 | * @return \DateTime |
|
| 67 | */ |
||
| 68 | public function getCreatedAt(): \DateTime |
||
| 69 | { |
||
| 70 | return $this->createdAt; |
||
| 71 | } |
||
| 72 | 2 | ||
| 73 | /** |
||
| 74 | 2 | * @return Ulid |
|
| 75 | */ |
||
| 76 | public function getPostId(): Ulid |
||
| 79 | } |
||
| 80 | 2 | ||
| 81 | /** |
||
| 82 | 2 | * @return string |
|
| 83 | */ |
||
| 84 | public function getPostTitle(): string |
||
| 87 | } |
||
| 88 | 2 | ||
| 89 | /** |
||
| 90 | 2 | * @return array<string> |
|
| 91 | */ |
||
| 92 | public function getPostTags(): array |
||
| 98 | } |