Skip to content

Conversation

DanielEScherzer
Copy link
Member

@DanielEScherzer DanielEScherzer commented Oct 4, 2024

The type is enforced, and TypeErrors 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.

@DanielEScherzer
Copy link
Member Author

Oh, looks like the offset* methods need to be compatible with parent methods - I'll switch this to just RecursiveTreeIterator::__construct

@DanielEScherzer DanielEScherzer changed the title spl iterators: switch stub @param comments to actual typehints RecursiveTreeIterator::__construct(): switch @param to typehint Oct 4, 2024
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.
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

@Girgias Girgias merged commit 24d11b7 into php:master Oct 12, 2024
10 checks passed
@DanielEScherzer DanielEScherzer deleted the spl-typehints branch October 13, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants