Skip to content

Commit e039e60

Browse files
committed
Updated the DocBlocks of the Entities from consistency point of view.
1 parent 1f882a5 commit e039e60

File tree

4 files changed

+90
-0
lines changed

4 files changed

+90
-0
lines changed

src/AppBundle/Entity/Comment.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ class Comment
7676
*/
7777
private $author;
7878

79+
/**
80+
*
81+
*/
7982
public function __construct()
8083
{
8184
$this->publishedAt = new \DateTime();
@@ -91,11 +94,17 @@ public function isLegitComment()
9194
return !$containsInvalidCharacters;
9295
}
9396

97+
/**
98+
* @return int
99+
*/
94100
public function getId()
95101
{
96102
return $this->id;
97103
}
98104

105+
/**
106+
* @return string
107+
*/
99108
public function getContent()
100109
{
101110
return $this->content;
@@ -109,11 +118,17 @@ public function setContent($content)
109118
$this->content = $content;
110119
}
111120

121+
/**
122+
* @return \DateTime
123+
*/
112124
public function getPublishedAt()
113125
{
114126
return $this->publishedAt;
115127
}
116128

129+
/**
130+
* @param \DateTime $publishedAt
131+
*/
117132
public function setPublishedAt(\DateTime $publishedAt)
118133
{
119134
$this->publishedAt = $publishedAt;
@@ -135,11 +150,17 @@ public function setAuthor(User $author)
135150
$this->author = $author;
136151
}
137152

153+
/**
154+
* @return Post
155+
*/
138156
public function getPost()
139157
{
140158
return $this->post;
141159
}
142160

161+
/**
162+
* @param Post $post
163+
*/
143164
public function setPost(Post $post)
144165
{
145166
$this->post = $post;

src/AppBundle/Entity/Post.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

src/AppBundle/Entity/Tag.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ class Tag implements \JsonSerializable
4141
*/
4242
private $name;
4343

44+
/**
45+
* @return int
46+
*/
4447
public function getId()
4548
{
4649
return $this->id;
@@ -54,6 +57,9 @@ public function setName($name)
5457
$this->name = $name;
5558
}
5659

60+
/**
61+
* @return string
62+
*/
5763
public function getName()
5864
{
5965
return $this->name;
@@ -71,6 +77,9 @@ public function jsonSerialize()
7177
return $this->name;
7278
}
7379

80+
/**
81+
* @return string
82+
*/
7483
public function __toString()
7584
{
7685
return $this->name;

src/AppBundle/Entity/User.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ class User implements UserInterface
7373
*/
7474
private $roles = [];
7575

76+
/**
77+
* @return int
78+
*/
7679
public function getId()
7780
{
7881
return $this->id;
@@ -86,11 +89,17 @@ public function setFullName($fullName)
8689
$this->fullName = $fullName;
8790
}
8891

92+
/**
93+
* @return string
94+
*/
8995
public function getFullName()
9096
{
9197
return $this->fullName;
9298
}
9399

100+
/**
101+
* @return string
102+
*/
94103
public function getUsername()
95104
{
96105
return $this->username;
@@ -104,6 +113,9 @@ public function setUsername($username)
104113
$this->username = $username;
105114
}
106115

116+
/**
117+
* @return string
118+
*/
107119
public function getEmail()
108120
{
109121
return $this->email;
@@ -117,6 +129,9 @@ public function setEmail($email)
117129
$this->email = $email;
118130
}
119131

132+
/**
133+
* @return string
134+
*/
120135
public function getPassword()
121136
{
122137
return $this->password;
@@ -145,6 +160,9 @@ public function getRoles()
145160
return array_unique($roles);
146161
}
147162

163+
/**
164+
* @param array $roles
165+
*/
148166
public function setRoles(array $roles)
149167
{
150168
$this->roles = $roles;

0 commit comments

Comments
 (0)