@@ -114,10 +114,11 @@ discard block |
||
114 | 114 | 'sentAt' => time() |
115 | 115 | ); |
116 | 116 | |
117 | - if ($this->db->insert('messages', $insert)) |
|
118 | - return $this->db->lastInsertId(); |
|
119 | - else |
|
120 | - return false; |
|
117 | + if ($this->db->insert('messages', $insert)) { |
|
118 | + return $this->db->lastInsertId(); |
|
119 | + } else { |
|
120 | + return false; |
|
121 | + } |
|
121 | 122 | } |
122 | 123 | |
123 | 124 | public function sendFile($data) |
@@ -131,10 +132,11 @@ discard block |
||
131 | 132 | 'sentAt' => time() |
132 | 133 | ); |
133 | 134 | |
134 | - if ($this->db->insert('files', $insert)) |
|
135 | - return $this->db->lastInsertId(); |
|
136 | - else |
|
137 | - return false; |
|
135 | + if ($this->db->insert('files', $insert)) { |
|
136 | + return $this->db->lastInsertId(); |
|
137 | + } else { |
|
138 | + return false; |
|
139 | + } |
|
138 | 140 | } |
139 | 141 | |
140 | 142 | public function getMessageById($id) |