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

FindCommentsByPostIdQueryResponse   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 57
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getParentId() 0 3 1
A __construct() 0 8 1
A getCreatedAt() 0 3 1
A getAuthor() 0 3 1
A getId() 0 3 1
A getBody() 0 3 1
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
}