Skip to content

Commit

Permalink
Generic AppendIterator stub
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed May 26, 2022
1 parent 0b7527a commit 50cbc45
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ parameters:
- CallbackFilterIterator
- FilterIterator
- RecursiveCallbackFilterIterator
- AppendIterator
explicitMixedInUnknownGenericNew: false
explicitMixedViaIsArray: false
arrayFilter: false
Expand Down
23 changes: 23 additions & 0 deletions stubs/iterable.stub
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,26 @@ class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator
*/
public function uksort($cmp_function) { }
}


/**
* @template TKey of array-key
* @template TValue
* @template TIterator as Iterator<TKey, TValue>
*
* @template-extends IteratorIterator<TKey, TValue, TIterator>
*/
class AppendIterator extends IteratorIterator {

/**
* @param TIterator $iterator
* @return void
*/
public function append(Iterator $iterator) {}

/**
* @return ArrayIterator<TKey, TValue>
*/
public function getArrayIterator() {}

}

0 comments on commit 50cbc45

Please sign in to comment.