diff options
Diffstat (limited to 'modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php')
-rw-r--r-- | modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php b/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php index 2cb2be18..4588bf7c 100644 --- a/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php +++ b/modules-available/locationinfo/inc/coursebackend/coursebackend_dummy.inc.php @@ -15,9 +15,9 @@ class CourseBackend_Dummy extends CourseBackend * @param int $serverId ID of the server * @returns bool if the credentials were in the correct format */ - public function setCredentialsInternal($json) + public function setCredentialsInternal(array $data): bool { - $x = $json; + $x = $data; $this->pw = $x['password']; if ($this->pw === "mfg") { @@ -30,7 +30,7 @@ class CourseBackend_Dummy extends CourseBackend /** * @return boolean true if the connection works, false otherwise */ - public function checkConnection() + public function checkConnection(): bool { if ($this->pw == "mfg") { return true; @@ -42,7 +42,7 @@ class CourseBackend_Dummy extends CourseBackend /** * @returns array with parameter name as key and and an array with type, help text and mask as value */ - public function getCredentialDefinitions() + public function getCredentialDefinitions(): array { $options = ["opt1", "opt2", "opt3", "opt4", "opt5", "opt6", "opt7", "opt8"]; return [ @@ -58,7 +58,7 @@ class CourseBackend_Dummy extends CourseBackend /** * @return string return display name of backend */ - public function getDisplayName() + public function getDisplayName(): string { return 'Dummy with array'; } @@ -66,7 +66,7 @@ class CourseBackend_Dummy extends CourseBackend /** * @return int desired caching time of results, in seconds. 0 = no caching */ - public function getCacheTime() + public function getCacheTime(): int { return 0; } @@ -75,7 +75,7 @@ class CourseBackend_Dummy extends CourseBackend * @return int age after which timetables are no longer refreshed should be * greater then CacheTime */ - public function getRefreshTime() + public function getRefreshTime(): int { return 0; } @@ -83,15 +83,15 @@ class CourseBackend_Dummy extends CourseBackend /** * Internal version of fetch, to be overridden by subclasses. * - * @param $roomIds array with local ID as key and serverId as value + * @param $requestedRoomIds array with local ID as key and serverId as value * @return array a recursive array that uses the roomID as key * and has the schedule array as value. A schedule array contains an array in this format: * ["start"=>'YYYY-MM-DD<T>HH:MM:SS',"end"=>'YYYY-MM-DD<T>HH:MM:SS',"title"=>string] */ - public function fetchSchedulesInternal($roomId) + public function fetchSchedulesInternal(array $requestedRoomIds): array { $a = array(); - foreach ($roomId as $id) { + foreach ($requestedRoomIds as $id) { if ($id == 1) { $now = time(); return array($id => array( |