CreateNewUserPostHeaderDto::getCreatedByName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

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
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace App\Modules\Security\Domain\Dto;
4
5
use Symfony\Component\Uid\Ulid;
6
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
45
    {
46 5
        return $this->title;
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
69
    {
70 1
        return $this->createdById;
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
93
    {
94 5
        return $this->version;
95
    }
96
97
    /**
98
     * @return int
99
     */
100 5
    public function getCommentsCount(): int
101
    {
102 5
        return $this->commentsCount;
103
    }
104
105
}