* [unittest] fix sonar.

This commit is contained in:
qixinzhi
2025-08-06 00:55:49 +00:00
committed by sunguangming
parent b49bec6e1f
commit 3594823e80
@@ -31,13 +31,11 @@ class count_of_finished_dev_task_in_execution_when_closing extends baseCalc
public function calculate($row)
{
$finishedDate = $this->isDate($row->finishedDate) ? $row->finishedDate : $row->closedDate;
if(!helper::isZeroDate($row->executionClosedDate))
if(helper::isZeroDate($row->executionClosedDate) || $row->type == 'devel') return;
if($row->status == 'done' || ($row->status == 'closed' && $row->closedReason == 'done') && $finishedDate <= $row->executionClosedDate)
{
if($row->type == 'devel' && ($row->status == 'done' || ($row->status == 'closed' && $row->closedReason == 'done')) && $finishedDate <= $row->executionClosedDate)
{
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = 0;
$this->result[$row->execution] ++;
}
if(!isset($this->result[$row->execution])) $this->result[$row->execution] = 0;
$this->result[$row->execution] ++;
}
}