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

Fix the signature of the value returned from the date_parse and date_parse_from_format functions #807

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Fix the signature of the value returned from the date_parse and date_parse_from_format functions #807

merged 1 commit into from
Nov 29, 2021

Conversation

ste93cry
Copy link
Contributor

@ste93cry ste93cry commented Nov 27, 2021

As per title, I noticed that the return value of the date_parse and date_parse_from_format functions is both wrong and incomplete. Accordig to php-src, it looks like both functions cannot return false even in case of parsing failure. Moreover, PHPStan was complaining about my code because it didn't know the shape of the returned array

@ondrejmirtes ondrejmirtes merged commit 79e0a79 into phpstan:master Nov 29, 2021
@ondrejmirtes
Copy link
Member

Thank you, perfect!

@ste93cry ste93cry deleted the fix-date-parse-functions-return-value-signature branch November 29, 2021 13:01
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