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