Total Complexity | 10 |
Total Lines | 98 |
Duplicated Lines | 0 % |
Coverage | 60% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | #[ORM\Entity] |
||
10 | #[ORM\Table(name: "POST_HEADERS")] |
||
11 | class CommentPostHeader |
||
12 | { |
||
13 | #[ORM\Id] |
||
14 | #[ORM\Column(type: "ulid", unique: true)] |
||
15 | private Ulid $id; |
||
16 | |||
17 | #[ORM\Column(type: "string")] |
||
18 | private string $title; |
||
19 | |||
20 | #[ORM\Column(type: "json")] |
||
21 | private array $tags = []; |
||
22 | |||
23 | #[ORM\Column(type: "integer")] |
||
24 | private int $version; |
||
25 | |||
26 | #[ORM\OneToMany(mappedBy: 'post', targetEntity: Comment::class)] |
||
27 | private Collection $comments; |
||
28 | |||
29 | /** |
||
30 | * @return Ulid |
||
31 | */ |
||
32 | public function getId(): Ulid |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param Ulid $id |
||
39 | */ |
||
40 | public function setId(Ulid $id): void |
||
41 | { |
||
42 | $this->id = $id; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | public function getTitle(): string |
||
49 | { |
||
50 | return $this->title; |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @param string $title |
||
55 | 3 | */ |
|
56 | public function setTitle(string $title): void |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * @return array |
||
63 | */ |
||
64 | public function getTags(): array |
||
65 | { |
||
66 | return $this->tags; |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * @param array $tags |
||
71 | 3 | */ |
|
72 | public function setTags(array $tags): void |
||
73 | 3 | { |
|
74 | 3 | $this->tags = $tags; |
|
75 | } |
||
76 | |||
77 | /** |
||
78 | * @return int |
||
79 | */ |
||
80 | public function getVersion(): int |
||
81 | { |
||
82 | return $this->version; |
||
83 | } |
||
84 | |||
85 | /** |
||
86 | * @param int $version |
||
87 | 3 | */ |
|
88 | public function setVersion(int $version): void |
||
89 | 3 | { |
|
90 | 3 | $this->version = $version; |
|
91 | } |
||
92 | |||
93 | /** |
||
94 | * @return Collection |
||
95 | */ |
||
96 | public function getComments(): Collection |
||
99 | } |
||
100 | |||
101 | /** |
||
102 | * @param Collection $comments |
||
103 | 3 | */ |
|
104 | public function setComments(Collection $comments): void |
||
107 | } |
||
108 | } |