diff --git a/conf/config.neon b/conf/config.neon index 1f827f472d..5a64dc9f22 100644 --- a/conf/config.neon +++ b/conf/config.neon @@ -38,6 +38,7 @@ parameters: objectFromNewClass: false skipCheckGenericClasses: - RecursiveIterator + - RecursiveArrayIterator rememberFunctionValues: false preciseExceptionTracking: false apiRules: false diff --git a/stubs/iterable.stub b/stubs/iterable.stub index 74d3508bd8..bf2c9246af 100644 --- a/stubs/iterable.stub +++ b/stubs/iterable.stub @@ -192,3 +192,33 @@ class IteratorIterator implements OuterIterator { */ public function __construct(Traversable $iterator) {} } + +/** + * @template TKey + * @template TValue + * + * @template-implements RecursiveIterator + * @template-extends ArrayIterator + */ +class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator { + + /** + * @return RecursiveArrayIterator + */ + public function getChildren() {} + + /** + * @return bool + */ + public function hasChildren() {} + + /** + * @return TValue + */ + public function current() {} + + /** + * @return TKey + */ + public function key() {} +}