Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the return type of SplFileObject::fstat() #996

Merged
merged 2 commits into from Feb 6, 2022

Conversation

johnbillion
Copy link
Contributor

@johnbillion johnbillion commented Feb 4, 2022

Given an invalid file the *stat() functions can return boolean false, but the SplFileObject::fstat() method cannot because its constructor will throw an exception.

Ref: https://3v4l.org/4IEZL

@johnbillion johnbillion marked this pull request as ready for review February 5, 2022 22:26
@ondrejmirtes ondrejmirtes merged commit c0fe972 into phpstan:master Feb 6, 2022
@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants