Skip to content

Commit

Permalink
Stub for RecursiveArrayIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 8, 2021
1 parent 33c9bdc commit 8c33955
Show file tree
Hide file tree
Showing 2 changed files with 31 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 @@ -38,6 +38,7 @@ parameters:
objectFromNewClass: false
skipCheckGenericClasses:
- RecursiveIterator
- RecursiveArrayIterator
rememberFunctionValues: false
preciseExceptionTracking: false
apiRules: false
Expand Down
30 changes: 30 additions & 0 deletions stubs/iterable.stub
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,33 @@ class IteratorIterator implements OuterIterator {
*/
public function __construct(Traversable $iterator) {}
}

/**
* @template TKey
* @template TValue
*
* @template-implements RecursiveIterator<TKey, TValue>
* @template-extends ArrayIterator<TKey, TValue>
*/
class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator {

/**
* @return RecursiveArrayIterator<TKey, TValue>
*/
public function getChildren() {}

/**
* @return bool
*/
public function hasChildren() {}

/**
* @return TValue
*/
public function current() {}

/**
* @return TKey
*/
public function key() {}
}

0 comments on commit 8c33955

Please sign in to comment.