diff options
author | Simon Rettberg | 2023-11-14 14:47:55 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-11-14 14:47:55 +0100 |
commit | 06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0 (patch) | |
tree | 7e5493b102074672d8cfd8fe1a61e49f080edbe8 /modules-available/exams/inc | |
parent | Update phpstorm config (diff) | |
download | slx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.tar.gz slx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.tar.xz slx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.zip |
Add function param/return types, fix a lot more phpstorm complaints
Diffstat (limited to 'modules-available/exams/inc')
-rw-r--r-- | modules-available/exams/inc/exams.inc.php | 9 |
1 files changed, 3 insertions, 6 deletions
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; } |