Skip to content

Commit 85aeab6

Browse files
committed
Naming change only.
1 parent 7a66b97 commit 85aeab6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

webapp/src/Service/ScoreboardService.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,8 @@ public function updateRankCache(Contest $contest, Team $team): void
558558
$scoreIsInSeconds = (bool)$this->config->get('score_in_seconds');
559559

560560
// Now fetch the ScoreCache entries.
561-
/** @var ScoreCache[] $scoreCacheRows */
562-
$scoreCacheRows = $this->em->createQueryBuilder()
561+
/** @var ScoreCache[] $scoreCacheCells */
562+
$scoreCacheCells = $this->em->createQueryBuilder()
563563
->from(ScoreCache::class, 's')
564564
->select('s')
565565
->andWhere('s.contest = :contest')
@@ -569,21 +569,21 @@ public function updateRankCache(Contest $contest, Team $team): void
569569
->getQuery()
570570
->getResult();
571571

572-
// Process all score cache rows.
573-
foreach ($scoreCacheRows as $scoreCache) {
572+
// Process all score cache cells.
573+
foreach ($scoreCacheCells as $scoreCacheCell) {
574574
foreach ($variants as $variant => $isRestricted) {
575-
$probId = $scoreCache->getProblem()->getProbid();
576-
if (isset($contestProblems[$probId]) && $scoreCache->getIsCorrect($isRestricted)) {
577-
$penalty = Utils::calcPenaltyTime($scoreCache->getIsCorrect($isRestricted),
578-
$scoreCache->getSubmissions($isRestricted),
575+
$probId = $scoreCacheCell->getProblem()->getProbid();
576+
if (isset($contestProblems[$probId]) && $scoreCacheCell->getIsCorrect($isRestricted)) {
577+
$penalty = Utils::calcPenaltyTime($scoreCacheCell->getIsCorrect($isRestricted),
578+
$scoreCacheCell->getSubmissions($isRestricted),
579579
$penaltyTime, $scoreIsInSeconds);
580580

581581
$numPoints[$variant] += $contestProblems[$probId]->getPoints();
582582
$totalTime[$variant] += Utils::scoretime(
583-
(float)$scoreCache->getSolveTime($isRestricted),
583+
(float)$scoreCacheCell->getSolveTime($isRestricted),
584584
$scoreIsInSeconds
585585
) + $penalty;
586-
$totalRuntime[$variant] += $scoreCache->getRuntime($isRestricted);
586+
$totalRuntime[$variant] += $scoreCacheCell->getRuntime($isRestricted);
587587
}
588588
}
589589
}

0 commit comments

Comments
 (0)