Skip to content

Commit 0d7b230

Browse files
committed
Use strict testing to make sure PHPstan finds the issues
1 parent 345932d commit 0d7b230

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webapp/src/Controller/API/JudgehostController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ private function addSingleJudgingRun(
10081008
}
10091009
}
10101010
$sendJudgingEvent = false;
1011-
if (!$hasNullResults || $lazyEval != DOMJudgeService::EVAL_FULL) {
1011+
if (!$hasNullResults || $lazyEval !== DOMJudgeService::EVAL_FULL) {
10121012
// NOTE: setting endtime here determines in testcases_GET
10131013
// whether a next testcase will be handed out.
10141014
$judging->setEndtime(Utils::now());
@@ -1024,7 +1024,7 @@ private function addSingleJudgingRun(
10241024
throw new BadMethodCallException('internal bug: the evaluated result changed during judging');
10251025
}
10261026

1027-
if ($lazyEval != DOMJudgeService::EVAL_FULL) {
1027+
if ($lazyEval !== DOMJudgeService::EVAL_FULL) {
10281028
// We don't want to continue on this problem, even if there's spare resources.
10291029
$this->em->getConnection()->executeStatement(
10301030
'UPDATE judgetask SET valid=0, priority=:priority'
@@ -1076,7 +1076,7 @@ private function addSingleJudgingRun(
10761076
}
10771077
}
10781078

1079-
return $judging->getResult() === null || $judging->getJudgeCompletely() || $lazyEval == DOMJudgeService::EVAL_FULL;
1079+
return $judging->getResult() === null || $judging->getJudgeCompletely() || $lazyEval === DOMJudgeService::EVAL_FULL;
10801080
}
10811081

10821082
private function maybeUpdateActiveJudging(Judging $judging): void

0 commit comments

Comments
 (0)