MDL-73424 general: Internal methods must have same type as parent
Otherwise the error is thrown in PHP8.1
This commit is contained in:
@@ -40,23 +40,25 @@ class backup_array_iterator implements iterator {
|
||||
$this->arr = $arr;
|
||||
}
|
||||
|
||||
public function rewind() {
|
||||
return reset($this->arr);
|
||||
public function rewind(): void {
|
||||
reset($this->arr);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current() {
|
||||
return current($this->arr);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key() {
|
||||
return key($this->arr);
|
||||
}
|
||||
|
||||
public function next() {
|
||||
return next($this->arr);
|
||||
public function next(): void {
|
||||
next($this->arr);
|
||||
}
|
||||
|
||||
public function valid() {
|
||||
public function valid(): bool {
|
||||
return key($this->arr) !== null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user