Test Setup Failed
Push — main ( abdcb9...2e5f68 )
by Slawomir
04:37
created

FindCommentsByPostIdQueryResponse::getAuthor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Modules\Comments\Api\Query\Response;
4
5
use Symfony\Component\Uid\Ulid;
6
7
class FindCommentsByPostIdQueryResponse
8
{
9
    /**
10
     * @param Ulid $id
11
     * @param string $author
12
     * @param string $body
13
     * @param Ulid|null $parentId
14
     * @param \DateTime $createdAt
15
     */
16
    public function __construct(
17
        private Ulid      $id,
18
        private string    $author,
19
        private string    $body,
20
        private ?Ulid     $parentId,
21
        private \DateTime $createdAt
22
    )
23
    {
24
    }
25
26
    /**
27
     * @return Ulid
28
     */
29
    public function getId(): Ulid
30
    {
31
        return $this->id;
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getAuthor(): string
38
    {
39
        return $this->author;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getBody(): string
46
    {
47
        return $this->body;
48
    }
49
50
    /**
51
     * @return Ulid|null
52
     */
53
    public function getParentId(): ?Ulid
54
    {
55
        return $this->parentId;
56
    }
57
58
    /**
59
     * @return \DateTime
60
     */
61
    public function getCreatedAt(): \DateTime
62
    {
63
        return $this->createdAt;
64
    }
65
66
67
}