From d8a1dff88bdc8a2375bd60957de9fc9486567454 Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 24 Oct 2023 15:34:25 +0800 Subject: [PATCH] * pivotModel: declare the parameter types and return type of the getProducts method. --- module/pivot/model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/pivot/model.php b/module/pivot/model.php index 16e4a7a582..761d681406 100644 --- a/module/pivot/model.php +++ b/module/pivot/model.php @@ -336,10 +336,12 @@ class pivotModel extends model /** * Get products. * + * @param string $conditions + * @param string $storyType * @access public * @return array */ - public function getProducts($conditions, $storyType = 'story') + public function getProducts(string $conditions, string $storyType = 'story'): array { $permission = common::hasPriv('pivot', 'showProduct') or $this->app->user->admin; $products = $this->dao->select('t1.id as id, t1.code, t1.name, t1.PO')->from(TABLE_PRODUCT)->alias('t1')