@@ -128,7 +128,7 @@ public function __construct()
128128 $ this ->tags = new ArrayCollection ();
129129 }
130130
131- public function getId (): int
131+ public function getId (): ? int
132132 {
133133 return $ this ->id ;
134134 }
@@ -138,7 +138,7 @@ public function getTitle(): ?string
138138 return $ this ->title ;
139139 }
140140
141- public function setTitle (? string $ title ): void
141+ public function setTitle (string $ title ): void
142142 {
143143 $ this ->title = $ title ;
144144 }
@@ -148,7 +148,7 @@ public function getSlug(): ?string
148148 return $ this ->slug ;
149149 }
150150
151- public function setSlug (? string $ slug ): void
151+ public function setSlug (string $ slug ): void
152152 {
153153 $ this ->slug = $ slug ;
154154 }
@@ -158,7 +158,7 @@ public function getContent(): ?string
158158 return $ this ->content ;
159159 }
160160
161- public function setContent (? string $ content ): void
161+ public function setContent (string $ content ): void
162162 {
163163 $ this ->content = $ content ;
164164 }
@@ -168,17 +168,17 @@ public function getPublishedAt(): \DateTime
168168 return $ this ->publishedAt ;
169169 }
170170
171- public function setPublishedAt (? \DateTime $ publishedAt ): void
171+ public function setPublishedAt (\DateTime $ publishedAt ): void
172172 {
173173 $ this ->publishedAt = $ publishedAt ;
174174 }
175175
176- public function getAuthor (): User
176+ public function getAuthor (): ? User
177177 {
178178 return $ this ->author ;
179179 }
180180
181- public function setAuthor (? User $ author ): void
181+ public function setAuthor (User $ author ): void
182182 {
183183 $ this ->author = $ author ;
184184 }
@@ -188,7 +188,7 @@ public function getComments(): Collection
188188 return $ this ->comments ;
189189 }
190190
191- public function addComment (? Comment $ comment ): void
191+ public function addComment (Comment $ comment ): void
192192 {
193193 $ comment ->setPost ($ this );
194194 if (!$ this ->comments ->contains ($ comment )) {
@@ -198,7 +198,6 @@ public function addComment(?Comment $comment): void
198198
199199 public function removeComment (Comment $ comment ): void
200200 {
201- $ comment ->setPost (null );
202201 $ this ->comments ->removeElement ($ comment );
203202 }
204203
@@ -207,12 +206,12 @@ public function getSummary(): ?string
207206 return $ this ->summary ;
208207 }
209208
210- public function setSummary (? string $ summary ): void
209+ public function setSummary (string $ summary ): void
211210 {
212211 $ this ->summary = $ summary ;
213212 }
214213
215- public function addTag (? Tag ...$ tags ): void
214+ public function addTag (Tag ...$ tags ): void
216215 {
217216 foreach ($ tags as $ tag ) {
218217 if (!$ this ->tags ->contains ($ tag )) {
0 commit comments