Fix type for array_splice() argument $replacement#901
Fix type for array_splice() argument $replacement#901ondrejmirtes merged 1 commit intophpstan:masterfrom spawnia:patch-1
array_splice() argument $replacement#901Conversation
Resolves phpstan/phpstan#6288 Thanks to @herndlm
simPod
left a comment
There was a problem hiding this comment.
I think we will need to also change
to merge the types.But it might be tricky because of
Note: If replacement is not an array, it will be typecast to one (i.e. (array) $replacement). This may result in unexpected behavior when using an object or null replacement.
I'm not sure if this is related to this PR. At least it reads and looks like it already ignores Well, let's see what Ondrej says :) |
|
Thank you! Anyone, feel free to send an update to the array_splice dynamic return type extension so that it reads the replacement argument :) |
Resolves phpstan/phpstan#6288
Thanks to @herndlm