@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | use HTMLPurifier; |
9 | 9 | use HTMLPurifier_Config; |
10 | 10 | |
11 | -class CommentModel extends Model{ |
|
11 | +class CommentModel extends Model { |
|
12 | 12 | |
13 | 13 | private $commentTbl; |
14 | 14 | private $userTbl; |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | * @return int |
167 | 167 | * @throws \Exception |
168 | 168 | */ |
169 | - public function addComment(int $postId, int $userId, string $comment, bool $admin=false):int |
|
169 | + public function addComment(int $postId, int $userId, string $comment, bool $admin = false):int |
|
170 | 170 | { |
171 | 171 | $comment = $this->purifyHtml($comment); |
172 | - $sql=" |
|
172 | + $sql = " |
|
173 | 173 | INSERT INTO $this->commentTbl (users_idusers, posts_idposts, comment, approved, comment_date) |
174 | 174 | VALUES (:userId, :postId, :comment, :approved, NOW();) |
175 | 175 | "; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $this->bind(':approved', $admin); |
181 | 181 | |
182 | 182 | $this->execute(); |
183 | - return (int)$this->dbh->lastInsertId(); |
|
183 | + return (int) $this->dbh->lastInsertId(); |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | /** |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | { |
213 | 213 | $comment = $this->purifyHtml($comment); |
214 | 214 | |
215 | - $sql=" |
|
215 | + $sql = " |
|
216 | 216 | UPDATE $this->commentTbl |
217 | 217 | SET |
218 | 218 | comment = :comment, |