UserPostHeaderDto   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 99
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

10 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getId() 0 3 1
A getTitle() 0 3 1
A getCreatedById() 0 3 1
A getCreatedByName() 0 3 1
A getVersion() 0 3 1
A getCreatedAt() 0 3 1
A getCommentsCount() 0 3 1
A getSummary() 0 3 1
A getTags() 0 3 1
1
<?php
2
3
namespace App\Modules\Security\Domain\Dto;
4
5
use Symfony\Component\Uid\Ulid;
6
7
class UserPostHeaderDto
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 4
    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,
28
                                private int       $commentsCount)
29
    {
30 4
    }
31
32
    /**
33
     * @return Ulid
34
     */
35 4
    public function getId(): Ulid
36
    {
37 4
        return $this->id;
38
    }
39
40
41
    /**
42
     * @return string
43
     */
44 4
    public function getTitle(): string
45
    {
46 4
        return $this->title;
47
    }
48
49
    /**
50
     * @return string
51
     */
52 4
    public function getSummary(): string
53
    {
54 4
        return $this->summary;
55
    }
56
57
    /**
58
     * @return array
59
     */
60 4
    public function getTags(): array
61
    {
62 4
        return $this->tags;
63
    }
64
65
66
    /**
67
     * @return \DateTime
68
     */
69 4
    public function getCreatedAt(): \DateTime
70
    {
71 4
        return $this->createdAt;
72
    }
73
74
75
    /**
76
     * @return int
77
     */
78 4
    public function getVersion(): int
79
    {
80 4
        return $this->version;
81
    }
82
83
84
    /**
85
     * @return int
86
     */
87 2
    public function getCommentsCount(): int
88
    {
89 2
        return $this->commentsCount;
90
    }
91
92
    /**
93
     * @return Ulid
94
     */
95 4
    public function getCreatedById(): Ulid
96
    {
97 4
        return $this->createdById;
98
    }
99
100
    /**
101
     * @return string
102
     */
103 4
    public function getCreatedByName(): string
104
    {
105 4
        return $this->createdByName;
106
    }
107
108
109
}