From 06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 14 Nov 2023 14:47:55 +0100 Subject: Add function param/return types, fix a lot more phpstorm complaints --- modules-available/exams/inc/exams.inc.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'modules-available/exams/inc') diff --git a/modules-available/exams/inc/exams.inc.php b/modules-available/exams/inc/exams.inc.php index da4dec85..86dc6d89 100644 --- a/modules-available/exams/inc/exams.inc.php +++ b/modules-available/exams/inc/exams.inc.php @@ -4,14 +4,11 @@ class Exams { /** - * @param int[] of location ids. must bot be an associative array. - * @return: bool true iff for any of the given location ids an exam is scheduled. + * @param int[] $locationIds of location ids. must be an associative array. + * @return bool true iff for any of the given location ids an exam is scheduled. **/ - public static function isInExamMode($locationIds, &$lectureId = false, &$autoLogin = false) + public static function isInExamMode(array $locationIds, &$lectureId = false, &$autoLogin = false): bool { - if (!is_array($locationIds)) { - $locationIds = array($locationIds); - } if (empty($locationIds)) { $locationIds[] = 0; } -- cgit v1.2.3-55-g7522