Skip to content

Commit 43802c9

Browse files
Add return types to phpdoc for JudgehostController.
1 parent 7e96942 commit 43802c9

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
11
parameters:
22
ignoreErrors:
3-
-
4-
message: "#^Method App\\\\Controller\\\\API\\\\JudgehostController\\:\\:checkVersions\\(\\) return type has no value type specified in iterable type array\\.$#"
5-
count: 1
6-
path: webapp/src/Controller/API/JudgehostController.php
7-
8-
-
9-
message: "#^Method App\\\\Controller\\\\API\\\\JudgehostController\\:\\:createJudgehostAction\\(\\) return type has no value type specified in iterable type array\\.$#"
10-
count: 1
11-
path: webapp/src/Controller/API/JudgehostController.php
12-
13-
-
14-
message: "#^Method App\\\\Controller\\\\API\\\\JudgehostController\\:\\:getVersionCommands\\(\\) return type has no value type specified in iterable type array\\.$#"
15-
count: 1
16-
path: webapp/src/Controller/API/JudgehostController.php
17-
18-
-
19-
message: "#^Method App\\\\Controller\\\\API\\\\JudgehostController\\:\\:updateJudgeHostAction\\(\\) return type has no value type specified in iterable type array\\.$#"
20-
count: 1
21-
path: webapp/src/Controller/API/JudgehostController.php
22-
233
-
244
message: "#^Method App\\\\Controller\\\\API\\\\ProblemController\\:\\:addProblemsAction\\(\\) return type has no value type specified in iterable type array\\.$#"
255
count: 1

webapp/src/Controller/API/JudgehostController.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ public function getJudgehostsAction(
113113
/**
114114
* Add a new judgehost to the list of judgehosts.
115115
* Also restarts (and returns) unfinished judgings.
116+
*
117+
* @return array<array{jobid: int, submitid: int}>
116118
* @throws NonUniqueResultException
117119
*/
118120
#[IsGranted('ROLE_JUDGEHOST')]
@@ -192,6 +194,8 @@ public function createJudgehostAction(Request $request): array
192194

193195
/**
194196
* Update the configuration of the given judgehost.
197+
*
198+
* @return Judgehost[]
195199
*/
196200
#[IsGranted('ROLE_JUDGEHOST')]
197201
#[Rest\Put('/{hostname}')]
@@ -1184,6 +1188,8 @@ public function getFilesAction(
11841188

11851189
/**
11861190
* Get version commands for a given compile script.
1191+
*
1192+
* @return array{compiler_version_command?: string, runner_version_command?: string}
11871193
*/
11881194
#[IsGranted(new Expression("is_granted('ROLE_JURY') or is_granted('ROLE_JUDGEHOST')"))]
11891195
#[Rest\Get('/get_version_commands/{judgetaskid<\d+>}')]
@@ -1224,6 +1230,9 @@ public function getVersionCommands(string $judgetaskid): array
12241230
return $ret;
12251231
}
12261232

1233+
/**
1234+
* @return array{}
1235+
*/
12271236
#[IsGranted(new Expression("is_granted('ROLE_JURY') or is_granted('ROLE_JUDGEHOST')"))]
12281237
#[Rest\Put('/check_versions/{judgetaskid}')]
12291238
#[OA\Response(

0 commit comments

Comments
 (0)