From 470fb5ad52f9d40eee01742d2bee0b692d1ee4af Mon Sep 17 00:00:00 2001 From: liugang Date: Mon, 11 Dec 2023 14:29:23 +0800 Subject: [PATCH] * userModel: declare parameter type and return type of the deleteContactList method. --- module/user/model.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/user/model.php b/module/user/model.php index a6f17878e4..d97fa25640 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -1540,15 +1540,17 @@ class userModel extends model } /** + * 删除一个联系人列表。 * Delete a contact list. * * @param int $listID * @access public - * @return void + * @return bool */ - public function deleteContactList($listID) + public function deleteContactList(int $listID): bool { - return $this->dao->delete()->from(TABLE_USERCONTACT)->where('id')->eq($listID)->exec(); + $this->dao->delete()->from(TABLE_USERCONTACT)->where('id')->eq($listID)->exec(); + return !dao::isError(); } /**