Passed
Push — Comments ( 0e09d9...73e073 )
by Stone
02:13
created
App/Models/CommentModel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use Core\Container;
7 7
 use Core\Constant;
8 8
 
9
-class CommentModel extends Model{
9
+class CommentModel extends Model {
10 10
 
11 11
     private $commentTbl;
12 12
     private $userTbl;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function addComment(int $postId, int $userId, string $message):int
105 105
     {
106
-        $sql="
106
+        $sql = "
107 107
             INSERT INTO $this->commentTbl (users_idusers, posts_idposts, comment, approved)
108 108
             VALUES (:userId, :postId, :comment, 0)
109 109
         ";
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->bind(':comment', $message);
114 114
 
115 115
         $this->execute();
116
-        return (int)$this->dbh->lastInsertId();
116
+        return (int) $this->dbh->lastInsertId();
117 117
     }
118 118
 
119 119
 }
120 120
\ No newline at end of file
Please login to merge, or discard this patch.