Passed
Push — Security_and_bug_fixes ( f1e5be...1e3663 )
by Stone
14:59 queued 12:23
created
App/Models/CommentModel.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.