diff --git a/webapp/src/Entity/Contest.php b/webapp/src/Entity/Contest.php index 5d5d0b3ca3..bef0274539 100644 --- a/webapp/src/Entity/Contest.php +++ b/webapp/src/Entity/Contest.php @@ -1280,7 +1280,9 @@ public function validate(ExecutionContextInterface $context): void { foreach (['Activate', 'Deactivate', 'Start', 'End', 'Freeze', 'Unfreeze'] as $timeString) { $tmpValue = $this->{'get' . $timeString . 'timeString'}(); - if ($tmpValue === null) continue; + if ($tmpValue === null) { + continue; + } try { $this->checkValidTimeString($tmpValue); } catch (Exception $e) { diff --git a/webapp/src/Service/DOMJudgeService.php b/webapp/src/Service/DOMJudgeService.php index 2eb8f99fc0..7dc9e0af9e 100644 --- a/webapp/src/Service/DOMJudgeService.php +++ b/webapp/src/Service/DOMJudgeService.php @@ -1801,8 +1801,7 @@ public function checkNewVersion(): string|false { } } } - } - elseif ($this->config->get('check_new_version', false) === UpdateStrategy::Strategy_major_release) { + } elseif ($this->config->get('check_new_version', false) === UpdateStrategy::Strategy_major_release) { /* Steer towards the latest version directly * So the expected path would be: * DJ6.0.0 -> DJ9.1.2 diff --git a/webapp/src/Service/EventLogService.php b/webapp/src/Service/EventLogService.php index 0810ec9805..06d477c682 100644 --- a/webapp/src/Service/EventLogService.php +++ b/webapp/src/Service/EventLogService.php @@ -488,7 +488,7 @@ public function addMissingStateEvents(Contest $contest): void $this->dj->withAllRoles(function () use ($url, &$awards) { $response = $this->dj->internalApiRequest($url); if (!empty($response)) { - $awards = Utils::jsonDecode($response); + $awards = Utils::jsonDecode($response); } }); foreach ($awards as $award) { diff --git a/webapp/src/Utils/Utils.php b/webapp/src/Utils/Utils.php index 8bd9898fea..f24d65e246 100644 --- a/webapp/src/Utils/Utils.php +++ b/webapp/src/Utils/Utils.php @@ -1082,10 +1082,10 @@ public static function extendMaxExecutionTime(int $minimumMaxExecutionTime): voi /** * Call ob_flush() unless the top-level output buffer does not allow it. */ - public static function ob_flush_if_possible(): bool + public static function ob_flush_if_possible(): bool // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps { $status = ob_get_status(); - if ( empty($status) || ($status['flags'] & PHP_OUTPUT_HANDLER_CLEANABLE) ) { + if (empty($status) || ($status['flags'] & PHP_OUTPUT_HANDLER_CLEANABLE)) { return ob_flush(); } return false;