@@ -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; |
@@ -154,10 +154,10 @@ discard block |
||
154 | 154 | * @return int |
155 | 155 | * @throws \Exception |
156 | 156 | */ |
157 | - public function addComment(int $postId, int $userId, string $comment, bool $admin=false):int |
|
157 | + public function addComment(int $postId, int $userId, string $comment, bool $admin = false):int |
|
158 | 158 | { |
159 | 159 | $comment = $this->purifyHtml($comment); |
160 | - $sql=" |
|
160 | + $sql = " |
|
161 | 161 | INSERT INTO $this->commentTbl (users_idusers, posts_idposts, comment, approved) |
162 | 162 | VALUES (:userId, :postId, :comment, :approved) |
163 | 163 | "; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $this->bind(':approved', $admin); |
169 | 169 | |
170 | 170 | $this->execute(); |
171 | - return (int)$this->dbh->lastInsertId(); |
|
171 | + return (int) $this->dbh->lastInsertId(); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | |
202 | 202 | $comment = $this->purifyHtml($comment); |
203 | 203 | |
204 | - $sql=" |
|
204 | + $sql = " |
|
205 | 205 | UPDATE $this->commentTbl |
206 | 206 | SET |
207 | 207 | comment = :comment, |