fix: Phan Critical 경고 해결

This commit is contained in:
2023-08-01 16:28:28 +00:00
parent 982ce86ad8
commit ed035ab75f
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -1004,10 +1004,14 @@ class General extends GeneralLite implements iAction
$result[$generalID] = new DummyGeneral($queryMode->value > 0);
continue;
}
if ($rawRanks->hasKey($generalID) && $rawRanks[$generalID]->count() !== count($rankColumn)) {
/** @var Map<RankColumn,int|float> */
$generalRankValues = $rawRanks[$generalID] ?? new Map();
if ($generalRankValues->count() !== count($rankColumn)) {
throw new \RuntimeException('column의 수가 일치하지 않음 : ' . $generalID);
}
$result[$generalID] = new static($rawGenerals[$generalID], $rawRanks[$generalID] ?? null, $rawAccessLogs[$generalID] ?? null, null, null, $year, $month);
$generalAccessLog = $rawAccessLogs[$generalID] ?? new Map();
$result[$generalID] = new static($rawGenerals[$generalID], $generalRankValues, $generalAccessLog, null, null, $year, $month);
}
return $result;