| Total Complexity | 9 |
| Total Lines | 89 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class PostHeaderDto |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @param Ulid $id |
||
| 12 | * @param string $title |
||
| 13 | * @param string $summary |
||
| 14 | * @param array<string> $tags |
||
| 15 | * @param int $commentsCount |
||
| 16 | * @param Ulid $createdById |
||
| 17 | * @param string $createdByName |
||
| 18 | * @param \DateTime $createdAt |
||
| 19 | */ |
||
| 20 | public function __construct( |
||
| 21 | private Ulid $id, |
||
| 22 | private string $title, |
||
| 23 | private string $summary, |
||
| 24 | private array $tags, |
||
| 25 | private int $commentsCount, |
||
| 26 | private Ulid $createdById, |
||
| 27 | private string $createdByName, |
||
| 28 | private \DateTime $createdAt |
||
| 29 | ) |
||
| 30 | { |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @return Ulid |
||
| 35 | */ |
||
| 36 | public function getId(): Ulid |
||
| 37 | { |
||
| 38 | return $this->id; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function getTitle(): string |
||
| 45 | { |
||
| 46 | return $this->title; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public function getSummary(): string |
||
| 53 | { |
||
| 54 | return $this->summary; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return array |
||
| 59 | */ |
||
| 60 | public function getTags(): array |
||
| 61 | { |
||
| 62 | return $this->tags; |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @return int |
||
| 67 | */ |
||
| 68 | public function getCommentsCount(): int |
||
| 69 | { |
||
| 70 | return $this->commentsCount; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @return Ulid |
||
| 75 | */ |
||
| 76 | public function getCreatedById(): Ulid |
||
| 77 | { |
||
| 78 | return $this->createdById; |
||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @return string |
||
| 83 | */ |
||
| 84 | public function getCreatedByName(): string |
||
| 87 | } |
||
| 88 | |||
| 89 | |||
| 90 | /** |
||
| 91 | * @return \DateTime |
||
| 92 | */ |
||
| 93 | public function getCreatedAt(): \DateTime |
||
| 94 | { |
||
| 99 | } |