PostCommentDto   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 48
ccs 0
cts 10
cp 0
rs 10
wmc 5

5 Methods

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