fix CallbackIterator to return mixed, as it can be overwritten with a callback

This commit is contained in:
ralf 2022-04-24 21:27:53 +02:00
parent c19eb3cb02
commit c7d7f3a304
2 changed files with 3 additions and 3 deletions

View File

@ -134,9 +134,9 @@ class CallbackIterator implements \Iterator
/**
* Return the key of the current element
*
* @return int
* @return mixed
*/
public function key(): int
public function key(): mixed
{
if (is_a($this->rs,'iterator'))
{

View File

@ -31,7 +31,7 @@ $interfaces = [
'valid' => 'bool',
],
'IteratorAggregate' => [
'getIterator' => 'Traversable',
'getIterator' => '\Traversable',
],
'ArrayAccess' => [
'offsetExists' => 'bool',