Verified Commit 3d8455df authored by David Beniamine's avatar David Beniamine
Browse files

Make plugin compatible with php 7.0

parent a0f99732
......@@ -53,7 +53,7 @@ class fetcher
/**
* @return \Stdclass {code, message}
*/
public function getLastError(): ?\Stdclass
public function getLastError()
{
return (object) $this->lastError;
}
......
......@@ -35,7 +35,7 @@ abstract class moodlefetcher
return \rtrim($CFG->labnbook_api_url, '/') . '/v1/redirect';
}
public function getLastError(): ?\Stdclass
public function getLastError()
{
return $this->fetcher->getLastError();
}
......
......@@ -76,7 +76,7 @@ class user extends moodlefetcher
* @param array $teamconfig
* @return object teamconfig
*/
public function useMission(int $missionId, int $courseId, string $coursename, ?int $groupId = null, array $teamconfig)
public function useMission($missionId, $courseId, $coursename, $groupId = null, $teamconfig)
{
return $this
->fetch(
......@@ -102,7 +102,7 @@ class user extends moodlefetcher
* @param array $teamconfig
* @return object teamconfig
*/
public function updateMissionUse(int $missionId, int $courseId, string $coursename, ?int $groupId = null, array $teamconfig)
public function updateMissionUse($missionId, $courseId, $coursename, $groupId = null, $teamconfig)
{
return $this
->fetch(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment