Deprecated: Return type of qtype_matrix_question::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in question/type/matrix/question.php on line 520
So this code generates a warning:
public function getIterator() {
return new ArrayIterator($this->cells());
}
This code does not:
public function getIterator(): ArrayIterator {
return new ArrayIterator($this->cells());
}
Deprecated: Return type of qtype_matrix_question::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in question/type/matrix/question.php on line 520
So this code generates a warning:
This code does not: