MDL-73424 general: Internal methods must have same type as parent

Otherwise the error is thrown in PHP8.1
This commit is contained in:
Marina Glancy
2022-10-10 16:46:13 +02:00
parent cc4fec275f
commit 41b93bd7e5
42 changed files with 154 additions and 98 deletions
+4 -2
View File
@@ -133,10 +133,12 @@ class pgsql_native_moodle_recordset extends moodle_recordset {
return $row;
}
#[\ReturnTypeWillChange]
public function current() {
return (object)$this->current;
}
#[\ReturnTypeWillChange]
public function key() {
// return first column value as key
if (!$this->current) {
@@ -146,11 +148,11 @@ class pgsql_native_moodle_recordset extends moodle_recordset {
return $key;
}
public function next() {
public function next(): void {
$this->current = $this->fetch_next();
}
public function valid() {
public function valid(): bool {
return !empty($this->current);
}