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 8d84312894
commit 941142c5be
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 the key of the current element
* *
* @return int * @return mixed
*/ */
public function key(): int public function key(): mixed
{ {
if (is_a($this->rs,'iterator')) if (is_a($this->rs,'iterator'))
{ {

View File

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