| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 133 | public static function markAsRead(Users $user): bool |
||
| 134 | { |
||
| 135 | $result = Di::getDefault()->getDb()->prepare( |
||
| 136 | 'UPDATE notifications set `read` = 1 WHERE users_id = ? AND companies_id = ? AND apps_id = ?' |
||
| 137 | ); |
||
| 138 | |||
| 139 | $result->execute([ |
||
| 140 | $user->getId(), |
||
| 141 | $user->currentCompanyId(), |
||
| 142 | Di::getDefault()->getApp()->getId() |
||
| 143 | ]); |
||
| 144 | |||
| 145 | return true; |
||
|
|
|||
| 146 | } |
||
| 165 |