* Modify return type and comment for function.

This commit is contained in:
jukui
2023-05-12 10:24:50 +08:00
parent 73ec945d45
commit d08bb6c374
2 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -1372,7 +1372,7 @@ class programplanModel extends model
* @access public
* @return array
*/
public function getSelfAndChildrenList(string|int|array $planIdList)
public function getSelfAndChildrenList(string|int|array $planIdList): array
{
if(is_numeric($planIdList)) $planIdList = (array)$planIdList;
+11 -8
View File
@@ -51,6 +51,7 @@ class programplanTest
}
/**
* 测试根据id 查询项目列表。
* Test get plans by idList.
*
* @param array $idList
@@ -105,6 +106,7 @@ class programplanTest
}
/**
* 测试获取阶段百分比。
* Test get total percent.
*
* @param int $stageID
@@ -112,7 +114,7 @@ class programplanTest
* @access public
* @return int
*/
public function getTotalPercentTest($stageID, $parent = false)
public function getTotalPercentTest(int $stageID, bool $parent = false): int
{
$stage = $this->objectModel->getByID($stageID);
@@ -429,13 +431,14 @@ class programplanTest
}
/**
* 测试获取阶段当前和子集信息。
* Test get plan and its children.
*
* @param string|int|array $executionIdList
* @param string|int|array $executionIdList
* @access public
* @return string
* @return array
*/
public function getSelfAndChildrenListTest($executionIdList)
public function getSelfAndChildrenListTest(string|int|array $executionIdList): array
{
$objects = $this->objectModel->getSelfAndChildrenList($executionIdList);
@@ -444,14 +447,14 @@ class programplanTest
return $objects;
}
/**
/**获取阶段同一层级信息。
* Test get plan's siblings.
*
* @param string|int|array $executionIdList
* @param string|int|array $executionIdList
* @access public
* @return string
* @return array
*/
public function getSiblingsTest($executionIdList)
public function getSiblingsTest(array|string|int $executionIdList): array
{
$objects = $this->objectModel->getSiblings($executionIdList);