@@ -60,9 +60,9 @@ public function __construct(
6060 public function importZippedProblem (
6161 ZipArchive $ zip ,
6262 string $ clientName ,
63- ?Problem $ problem = null ,
64- ?Contest $ contest = null ,
65- ? array &$ messages = []
63+ ?Problem $ problem ,
64+ ?Contest $ contest ,
65+ array &$ messages
6666 ): ?Problem {
6767 // This might take a while.
6868 Utils::extendMaxExecutionTime (300 );
@@ -923,6 +923,7 @@ public function importProblemFromRequest(Request $request, ?int $contestId = nul
923923 try {
924924 $ zip = $ this ->dj ->openZipFile ($ file ->getRealPath ());
925925 $ clientName = $ file ->getClientOriginalName ();
926+ /** @var array<string, string[]> $messages */
926927 $ messages = [];
927928 $ newProblem = $ this ->importZippedProblem (
928929 $ zip , $ clientName , $ problem , $ contest , $ messages
@@ -949,7 +950,7 @@ public function importProblemFromRequest(Request $request, ?int $contestId = nul
949950 }
950951
951952 /**
952- * @param array{danger?: string[], info?: string[]} $messages
953+ * @param array< string, string[]> $messages
953954 */
954955 private function searchAndAddValidator (ZipArchive $ zip , ?array &$ messages , string $ externalId , string $ validationMode , ?Problem $ problem ): bool
955956 {
@@ -1055,6 +1056,9 @@ private function searchAndAddValidator(ZipArchive $zip, ?array &$messages, strin
10551056 return true ;
10561057 }
10571058
1059+ /**
1060+ * @param array<string, string[]> $messages
1061+ */
10581062 public function parseTestCaseGroupMeta (string $ fileContent , string $ name , array &$ messages ): ?TestcaseGroup
10591063 {
10601064 $ yamlData = Yaml::parse ($ fileContent );
0 commit comments