CreateNewCommentsPostHeaderDto   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 3 1
A getTags() 0 3 1
A __construct() 0 5 1
A getId() 0 3 1
A getVersion() 0 3 1
1
<?php
2
3
namespace App\Modules\Comments\Domain\Dto;
4
5
use Symfony\Component\Uid\Ulid;
6
7
class CreateNewCommentsPostHeaderDto
8
{
9
    /**
10
     * @param Ulid $id
11
     * @param string $title
12
     * @param array $tags
13
     * @param int $version
14
     */
15
    public function __construct(private Ulid   $id,
16
                                private string $title,
17
                                private array  $tags,
18
                                private int    $version = 1)
19
    {
20 11
    }
21
22
    /**
23
     * @return Ulid
24
     */
25
    public function getId(): Ulid
26
    {
27
        return $this->id;
28
    }
29
30 11
31
    /**
32
     * @return string
33
     */
34
    public function getTitle(): string
35 11
    {
36
        return $this->title;
37 11
    }
38
39
    /**
40
     * @return array
41
     */
42
    public function getTags(): array
43
    {
44 11
        return $this->tags;
45
    }
46 11
47
    /**
48
     * @return int
49
     */
50
    public function getVersion(): int
51
    {
52 11
        return $this->version;
53
    }
54
55
}