@@ -857,7 +857,7 @@ private function readJudgehostLog(int $numLines = 20): string
857857 return trim (ob_get_clean ());
858858 }
859859
860- private function runCommandSafe (array $ command_parts , & $ retval = DONT_CARE , $ log_nonzero_exitcode = true ): bool
860+ private function runCommandSafe (array $ command_parts , &$ retval = DONT_CARE , $ log_nonzero_exitcode = true ): bool
861861 {
862862 if (empty ($ command_parts )) {
863863 logmsg (LOG_WARNING , "Need at least the command that should be called. " );
@@ -869,7 +869,7 @@ private function runCommandSafe(array $command_parts, & $retval = DONT_CARE, $lo
869869
870870 logmsg (LOG_DEBUG , "Executing command: $ command " );
871871 system ($ command , $ retval_local );
872- if ($ retval !== DONT_CARE ) $ retval = $ retval_local ;
872+ if ($ retval !== DONT_CARE ) $ retval = $ retval_local ; // phpcs:ignore Generic.ControlStructures.InlineControlStructure.NotAllowed
873873
874874 if ($ retval_local !== 0 ) {
875875 if ($ log_nonzero_exitcode ) {
@@ -888,8 +888,7 @@ private function fetchExecutable(
888888 string $ hash ,
889889 int $ judgeTaskId ,
890890 bool $ combined_run_compare = false
891- ): array
892- {
891+ ): array {
893892 [$ execrunpath , $ error , $ buildlogpath ] = $ this ->fetchExecutableInternal ($ workdirpath , $ type , $ execid , $ hash , $ combined_run_compare );
894893 if (isset ($ error )) {
895894 $ extra_log = null ;
@@ -917,8 +916,7 @@ private function fetchExecutableInternal(
917916 string $ execid ,
918917 string $ hash ,
919918 bool $ combined_run_compare = false
920- ): array
921- {
919+ ): array {
922920 $ execdir = join ('/ ' , [
923921 $ workdirpath ,
924922 'executable ' ,
@@ -1123,12 +1121,11 @@ private function registerJudgehost(): void
11231121 private function disable (
11241122 string $ kind ,
11251123 string $ idcolumn ,
1126- $ id ,
1124+ mixed $ id ,
11271125 string $ description ,
11281126 ?int $ judgeTaskId = null ,
11291127 ?string $ extra_log = null
1130- ): void
1131- {
1128+ ): void {
11321129 $ disabled = dj_json_encode (['kind ' => $ kind , $ idcolumn => $ id ]);
11331130 $ judgehostlog = $ this ->readJudgehostLog ();
11341131 if (isset ($ extra_log )) {
@@ -1197,8 +1194,7 @@ private function compile(
11971194 array $ compile_config ,
11981195 ?string $ daemonid ,
11991196 int $ output_storage_limit
1200- ): bool
1201- {
1197+ ): bool {
12021198 // Reuse compilation if it already exists.
12031199 if (file_exists ("$ workdir/compile.success " )) {
12041200 return true ;
0 commit comments