@@ -119,18 +119,27 @@ class Post
119119 */
120120 private $ tags ;
121121
122+ /**
123+ *
124+ */
122125 public function __construct ()
123126 {
124127 $ this ->publishedAt = new \DateTime ();
125128 $ this ->comments = new ArrayCollection ();
126129 $ this ->tags = new ArrayCollection ();
127130 }
128131
132+ /**
133+ * @return int
134+ */
129135 public function getId ()
130136 {
131137 return $ this ->id ;
132138 }
133139
140+ /**
141+ * @return string
142+ */
134143 public function getTitle ()
135144 {
136145 return $ this ->title ;
@@ -144,6 +153,9 @@ public function setTitle($title)
144153 $ this ->title = $ title ;
145154 }
146155
156+ /**
157+ * @return string
158+ */
147159 public function getSlug ()
148160 {
149161 return $ this ->slug ;
@@ -157,6 +169,9 @@ public function setSlug($slug)
157169 $ this ->slug = $ slug ;
158170 }
159171
172+ /**
173+ * @return string
174+ */
160175 public function getContent ()
161176 {
162177 return $ this ->content ;
@@ -170,11 +185,17 @@ public function setContent($content)
170185 $ this ->content = $ content ;
171186 }
172187
188+ /**
189+ * @return \DateTime
190+ */
173191 public function getPublishedAt ()
174192 {
175193 return $ this ->publishedAt ;
176194 }
177195
196+ /**
197+ * @param \DateTime $publishedAt
198+ */
178199 public function setPublishedAt (\DateTime $ publishedAt )
179200 {
180201 $ this ->publishedAt = $ publishedAt ;
@@ -196,22 +217,34 @@ public function setAuthor(User $author)
196217 $ this ->author = $ author ;
197218 }
198219
220+ /**
221+ * @return Comment[]|ArrayCollection
222+ */
199223 public function getComments ()
200224 {
201225 return $ this ->comments ;
202226 }
203227
228+ /**
229+ * @param Comment $comment
230+ */
204231 public function addComment (Comment $ comment )
205232 {
206233 $ this ->comments ->add ($ comment );
207234 $ comment ->setPost ($ this );
208235 }
209236
237+ /**
238+ * @param Comment $comment
239+ */
210240 public function removeComment (Comment $ comment )
211241 {
212242 $ this ->comments ->removeElement ($ comment );
213243 }
214244
245+ /**
246+ * @return string
247+ */
215248 public function getSummary ()
216249 {
217250 return $ this ->summary ;
@@ -225,18 +258,27 @@ public function setSummary($summary)
225258 $ this ->summary = $ summary ;
226259 }
227260
261+ /**
262+ * @param Tag $tag
263+ */
228264 public function addTag (Tag $ tag )
229265 {
230266 if (!$ this ->tags ->contains ($ tag )) {
231267 $ this ->tags ->add ($ tag );
232268 }
233269 }
234270
271+ /**
272+ * @param Tag $tag
273+ */
235274 public function removeTag (Tag $ tag )
236275 {
237276 $ this ->tags ->removeElement ($ tag );
238277 }
239278
279+ /**
280+ * @return Tag[]|ArrayCollection
281+ */
240282 public function getTags ()
241283 {
242284 return $ this ->tags ;
0 commit comments