From ecf7ac72f8d1cf954e7eec594ac5cb88eecdc6fa Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 18 Dec 2023 15:35:27 +0800 Subject: [PATCH] * Refactor stage::getByID method. --- module/stage/model.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/stage/model.php b/module/stage/model.php index f8f3846748..48784ea1c8 100644 --- a/module/stage/model.php +++ b/module/stage/model.php @@ -179,13 +179,14 @@ class stageModel extends model } /** - * Get a stage by id. + * 通过ID获取阶段信息。 + * Get stage info by ID. * - * @param int $stageID + * @param int $stageID * @access public - * @return object + * @return object|bool */ - public function getByID($stageID) + public function getByID(int $stageID): object|bool { return $this->dao->select('*')->from(TABLE_STAGE)->where('deleted')->eq(0)->andWhere('id')->eq((int)$stageID)->fetch(); }