PostCommentDto::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 7
ccs 0
cts 1
cp 0
crap 2
rs 10
1
<?php
2
3
namespace App\Modules\Posts\Domain\Dto;
4
5
use Symfony\Component\Uid\Ulid;
6
7
class PostCommentDto
8
{
9
10
    /**
11
     * @param Ulid $id
12
     * @param string $author
13
     * @param string $comment
14
     * @param \DateTime $createdAt
15
     */
16
    public function __construct(
17
        private Ulid $id,
18
        private string $author,
19
        private string $comment,
20
        private \DateTime $createdAt
21
    )
22
    {
23
    }
24
25
    /**
26
     * @return Ulid
27
     */
28
    public function getId(): Ulid
29
    {
30
        return $this->id;
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getAuthor(): string
37
    {
38
        return $this->author;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getComment(): string
45
    {
46
        return $this->comment;
47
    }
48
49
    /**
50
     * @return \DateTime
51
     */
52
    public function getCreatedAt(): \DateTime
53
    {
54
        return $this->createdAt;
55
    }
56
57
58
}