* Adjust code formatting and comments of programplanModel::getMilestones().

This commit is contained in:
xushenjie
2023-05-10 02:13:02 +00:00
parent 324ffe54fe
commit 0bfe386f7d
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -1171,13 +1171,15 @@ class programplanModel extends model
}
/**
* Get the stage set to milestone.
*
* 通过项目ID获取里程碑信息。
* Get milestones by projetc id.
*
* @param int $projectID
* @access public
* @return array
*/
public function getMilestones($projectID = 0)
public function getMilestones(int $projectID = 0): array
{
$milestones = $this->dao->select('id, path')->from(TABLE_PROJECT)
->where('project')->eq($projectID)
@@ -1186,6 +1188,7 @@ class programplanModel extends model
->andWhere('deleted')->eq(0)
->orderBy('begin_desc,path')
->fetchPairs();
return $this->programplanTao->formatMilestones($milestones, $projectID);
}
+1 -1
View File
@@ -219,7 +219,7 @@ class programplanTao extends programplanModel
foreach($milestones as $id => $path)
{
$paths = explode(',', trim($path, ','));
$paths = explode(',', trim($path, ','));
$stageName = '';
foreach($paths as $stage)
{