Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CachingIterator::getCache stub. #8282

Merged
merged 4 commits into from Jul 22, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions stubs/CoreGenericIterators.phpstub
Expand Up @@ -342,6 +342,7 @@ abstract class FilterIterator extends IteratorIterator {
* @template-covariant TKey
* @template-covariant TValue
* @template-covariant TIterator as Iterator<TKey, TValue>
* @template TFlags of int-mask<1,2,4,8,16,256>
*
* @template-implements OuterIterator<TKey, TValue>
* @template-implements ArrayAccess<TKey, TValue>
Expand All @@ -355,10 +356,10 @@ 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<self::*> $flags
* @param TFlags $flags
*/
public function __construct(Iterator $iterator, int $flags = self::CALL_TOSTRING) {}

Expand All @@ -376,6 +377,13 @@ class CachingIterator extends IteratorIterator implements OuterIterator , ArrayA
* @psalm-ignore-nullable-return
*/
public function key() {}

/**
* @psalm-if-this-is self<mixed, mixed, 256>
AndrolGenhald marked this conversation as resolved.
Show resolved Hide resolved
*
* @return array<array-key, TValue>
AndrolGenhald marked this conversation as resolved.
Show resolved Hide resolved
*/
public function getCache() {}
}

/**
Expand Down