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
added SscanfFunctionDynamicReturnTypeExtension return type extension #1434
Conversation
assertType('int|null', sscanf('20-20', '%d-%d', $first, $second)); | ||
assertType('array{int, int}|null', sscanf('20-20', '%d-%d')); | ||
|
||
assertType('array{string}|null', sscanf($s, '%c')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assertType('int|null', sscanf($s, $s, $first, $second)); | ||
assertType('array|null', sscanf($s, $s)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the 2 test-cases which existed before.. now with just a string
format, because otherwise we would not get the same results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change assertions of the existing sscanf('20-20', '%d-%d', $first, $second)
test and add sscanf($s, $s, $first, $second)
as a separate one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
built errors seem unrelated |
assertType('int|null', sscanf($s, $s, $first, $second)); | ||
assertType('array|null', sscanf($s, $s)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change assertions of the existing sscanf('20-20', '%d-%d', $first, $second)
test and add sscanf($s, $s, $first, $second)
as a separate one.
Thank you! |
Maybe a regression phpstan/phpstan#7764 |
No description provided.