Skip to content

Commit 50cbc45

Browse files
committed
Generic AppendIterator stub
1 parent 0b7527a commit 50cbc45

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

conf/config.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ parameters:
2727
- CallbackFilterIterator
2828
- FilterIterator
2929
- RecursiveCallbackFilterIterator
30+
- AppendIterator
3031
explicitMixedInUnknownGenericNew: false
3132
explicitMixedViaIsArray: false
3233
arrayFilter: false

stubs/iterable.stub

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,26 @@ class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator
275275
*/
276276
public function uksort($cmp_function) { }
277277
}
278+
279+
280+
/**
281+
* @template TKey of array-key
282+
* @template TValue
283+
* @template TIterator as Iterator<TKey, TValue>
284+
*
285+
* @template-extends IteratorIterator<TKey, TValue, TIterator>
286+
*/
287+
class AppendIterator extends IteratorIterator {
288+
289+
/**
290+
* @param TIterator $iterator
291+
* @return void
292+
*/
293+
public function append(Iterator $iterator) {}
294+
295+
/**
296+
* @return ArrayIterator<TKey, TValue>
297+
*/
298+
public function getArrayIterator() {}
299+
300+
}

0 commit comments

Comments
 (0)