@@ -554,8 +554,8 @@ public function updateRankCache(Contest $contest, Team $team): void
554554 $ scoreIsInSeconds = (bool )$ this ->config ->get ('score_in_seconds ' );
555555
556556 // Now fetch the ScoreCache entries.
557- /** @var ScoreCache[] $scoreCacheRows */
558- $ scoreCacheRows = $ this ->em ->createQueryBuilder ()
557+ /** @var ScoreCache[] $scoreCacheCells */
558+ $ scoreCacheCells = $ this ->em ->createQueryBuilder ()
559559 ->from (ScoreCache::class, 's ' )
560560 ->select ('s ' )
561561 ->andWhere ('s.contest = :contest ' )
@@ -565,21 +565,21 @@ public function updateRankCache(Contest $contest, Team $team): void
565565 ->getQuery ()
566566 ->getResult ();
567567
568- // Process all score cache rows .
569- foreach ($ scoreCacheRows as $ scoreCache ) {
568+ // Process all score cache cells .
569+ foreach ($ scoreCacheCells as $ scoreCacheCell ) {
570570 foreach ($ variants as $ variant => $ isRestricted ) {
571- $ probId = $ scoreCache ->getProblem ()->getProbid ();
572- if (isset ($ contestProblems [$ probId ]) && $ scoreCache ->getIsCorrect ($ isRestricted )) {
573- $ penalty = Utils::calcPenaltyTime ($ scoreCache ->getIsCorrect ($ isRestricted ),
574- $ scoreCache ->getSubmissions ($ isRestricted ),
571+ $ probId = $ scoreCacheCell ->getProblem ()->getProbid ();
572+ if (isset ($ contestProblems [$ probId ]) && $ scoreCacheCell ->getIsCorrect ($ isRestricted )) {
573+ $ penalty = Utils::calcPenaltyTime ($ scoreCacheCell ->getIsCorrect ($ isRestricted ),
574+ $ scoreCacheCell ->getSubmissions ($ isRestricted ),
575575 $ penaltyTime , $ scoreIsInSeconds );
576576
577577 $ numPoints [$ variant ] += $ contestProblems [$ probId ]->getPoints ();
578578 $ totalTime [$ variant ] += Utils::scoretime (
579- (float )$ scoreCache ->getSolveTime ($ isRestricted ),
579+ (float )$ scoreCacheCell ->getSolveTime ($ isRestricted ),
580580 $ scoreIsInSeconds
581581 ) + $ penalty ;
582- $ totalRuntime [$ variant ] += $ scoreCache ->getRuntime ($ isRestricted );
582+ $ totalRuntime [$ variant ] += $ scoreCacheCell ->getRuntime ($ isRestricted );
583583 }
584584 }
585585 }
0 commit comments