vprintf/vsprintf require a non-empty-array argument#3126
vprintf/vsprintf require a non-empty-array argument#3126ondrejmirtes merged 14 commits intophpstan:1.11.xfrom
Conversation
|
should |
|
Your example is misleading: https://3v4l.org/Mvl72 It'd make much more sense to create a rule similar to PrintfParametersRule. |
08e8aa1 to
faf6099
Compare
ondrejmirtes
left a comment
There was a problem hiding this comment.
I don't see tests for general arrays
- Zero placeholders + array (it's okay)
- One or more placeholders + array (not okay)
- One or more placeholders + non-empty-array (okay)
|
This pull request has been marked as ready for review. |
ecf35bc to
c0ac13c
Compare
323ad98 to
eb1e62d
Compare
6085104 to
d14b403
Compare
There was a problem hiding this comment.
What about handling $placeHoldersCount as IntegerRangeType + $formarArgsCount as ConstantIntegerType?
There was a problem hiding this comment.
if I don't oversee anything, this IF statement here will cover the remaining cases.
I simplified it further.
|
This pull request has been marked as ready for review. |
|
Thank you. |
these functions throw a ValueError when called with an empty array, see