@@ -128,7 +128,7 @@ public function __construct()
128
128
$ this ->tags = new ArrayCollection ();
129
129
}
130
130
131
- public function getId (): int
131
+ public function getId (): ? int
132
132
{
133
133
return $ this ->id ;
134
134
}
@@ -138,7 +138,7 @@ public function getTitle(): ?string
138
138
return $ this ->title ;
139
139
}
140
140
141
- public function setTitle (? string $ title ): void
141
+ public function setTitle (string $ title ): void
142
142
{
143
143
$ this ->title = $ title ;
144
144
}
@@ -148,7 +148,7 @@ public function getSlug(): ?string
148
148
return $ this ->slug ;
149
149
}
150
150
151
- public function setSlug (? string $ slug ): void
151
+ public function setSlug (string $ slug ): void
152
152
{
153
153
$ this ->slug = $ slug ;
154
154
}
@@ -158,7 +158,7 @@ public function getContent(): ?string
158
158
return $ this ->content ;
159
159
}
160
160
161
- public function setContent (? string $ content ): void
161
+ public function setContent (string $ content ): void
162
162
{
163
163
$ this ->content = $ content ;
164
164
}
@@ -168,17 +168,17 @@ public function getPublishedAt(): \DateTime
168
168
return $ this ->publishedAt ;
169
169
}
170
170
171
- public function setPublishedAt (? \DateTime $ publishedAt ): void
171
+ public function setPublishedAt (\DateTime $ publishedAt ): void
172
172
{
173
173
$ this ->publishedAt = $ publishedAt ;
174
174
}
175
175
176
- public function getAuthor (): User
176
+ public function getAuthor (): ? User
177
177
{
178
178
return $ this ->author ;
179
179
}
180
180
181
- public function setAuthor (? User $ author ): void
181
+ public function setAuthor (User $ author ): void
182
182
{
183
183
$ this ->author = $ author ;
184
184
}
@@ -188,7 +188,7 @@ public function getComments(): Collection
188
188
return $ this ->comments ;
189
189
}
190
190
191
- public function addComment (? Comment $ comment ): void
191
+ public function addComment (Comment $ comment ): void
192
192
{
193
193
$ comment ->setPost ($ this );
194
194
if (!$ this ->comments ->contains ($ comment )) {
@@ -198,7 +198,6 @@ public function addComment(?Comment $comment): void
198
198
199
199
public function removeComment (Comment $ comment ): void
200
200
{
201
- $ comment ->setPost (null );
202
201
$ this ->comments ->removeElement ($ comment );
203
202
}
204
203
@@ -207,12 +206,12 @@ public function getSummary(): ?string
207
206
return $ this ->summary ;
208
207
}
209
208
210
- public function setSummary (? string $ summary ): void
209
+ public function setSummary (string $ summary ): void
211
210
{
212
211
$ this ->summary = $ summary ;
213
212
}
214
213
215
- public function addTag (? Tag ...$ tags ): void
214
+ public function addTag (Tag ...$ tags ): void
216
215
{
217
216
foreach ($ tags as $ tag ) {
218
217
if (!$ this ->tags ->contains ($ tag )) {
0 commit comments