@@ -6,7 +6,7 @@ discard block |
||
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 |
||
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 |
||
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 |