Skip to content

Commit 24d11b7

Browse files
RecursiveTreeIterator::__construct(): switch @param to typehint (php#16215)
The type is enforced, and `TypeError`s are already thrown, but the information about the required type is not provided to Reflection. Replace the `@param` comment with a real typehint so that the information is also available via Reflection.
1 parent 8953348 commit 24d11b7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/spl/spl_iterators.stub.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,8 @@ class RecursiveTreeIterator extends RecursiveIteratorIterator
422422

423423
public const int PREFIX_RIGHT = 5;
424424

425-
/** @param RecursiveIterator|IteratorAggregate $iterator */
426425
public function __construct(
427-
$iterator,
426+
RecursiveIterator|IteratorAggregate $iterator,
428427
int $flags = RecursiveTreeIterator::BYPASS_KEY,
429428
int $cachingIteratorFlags = CachingIterator::CATCH_GET_CHILD,
430429
int $mode = RecursiveTreeIterator::SELF_FIRST

ext/spl/spl_iterators_arginfo.h

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)