diff --git a/stubs/CoreGenericIterators.phpstub b/stubs/CoreGenericIterators.phpstub index 69966ca69c7..f4432d23aa6 100644 --- a/stubs/CoreGenericIterators.phpstub +++ b/stubs/CoreGenericIterators.phpstub @@ -355,7 +355,7 @@ class CachingIterator extends IteratorIterator implements OuterIterator , ArrayA const TOSTRING_USE_CURRENT = 4 ; const TOSTRING_USE_INNER = 8 ; const FULL_CACHE = 256 ; - + /** * @param TIterator $iterator * @param int-mask-of $flags @@ -376,6 +376,11 @@ class CachingIterator extends IteratorIterator implements OuterIterator , ArrayA * @psalm-ignore-nullable-return */ public function key() {} + + /** + * @return array + */ + public function getCache() {} } /** @@ -799,19 +804,6 @@ class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator * @template-extends CachingIterator */ class RecursiveCachingIterator extends CachingIterator implements RecursiveIterator { - - const CALL_TOSTRING = 1 ; - const CATCH_GET_CHILD = 16 ; - const TOSTRING_USE_KEY = 2 ; - const TOSTRING_USE_CURRENT = 4 ; - const TOSTRING_USE_INNER = 8 ; - const FULL_CACHE = 256 ; - - /** - * @param TIterator $iterator - * @param int-mask-of $flags - */ - public function __construct(Iterator $iterator, int $flags = 0) {} /** * @return RecursiveCachingIterator */ @@ -821,18 +813,6 @@ class RecursiveCachingIterator extends CachingIterator implements RecursiveItera * @return bool */ public function hasChildren() {} - - /** - * @return TValue|null current value or null when iterator is drained - * @psalm-ignore-nullable-return - */ - public function current() {} - - /** - * @return TKey|null current key or null when iterator is drained - * @psalm-ignore-nullable-return - */ - public function key() {} } /**