-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
Rector\Removing\Rector\ClassMethod\ArgumentRemoverRector::isArgumentValueMatch(): Argument #2 ($values) must be of type array, string given #6657
Comments
Hi, seems the fix is already clear: The docs in rule needs to be updated. |
Yeah I've opened that as PR first, but noticed it is coming from docs. I also encountered that adding |
https://getrector.org/demo/1ec0570b-d66d-6fca-9e3a-cb9f01fd3936 results in no change, where I would expect last argument |
Maybe |
Will provide a PR. Thanks for instant help. Dump me :) |
The value to remove has to be enclosed as array. The value also has to match the type. The example has a boolean `true`. The example rule now matches that to prevent confusion. Resolves: rectorphp#6657
Bug Report
vendor/bin/rector --version
->Rector 7eb5e75cda2e0dc95198ec3841084792fac844fb
)Minimal PHP Code Causing Issue
https://getrector.org/demo/1ec056fc-11d4-6902-afc3-7bd57d99d6ca
Expected Behaviour
No error, as the example follows the docs. But the
'true'
has to be['true']
. That at least removes the error, but keeps the original call. So I'm not able to configure the rule to actually remove the last argument.I'm reporting this as bug instead of PR, as I expect tests to cover that, so something might be broken somewhere?
The text was updated successfully, but these errors were encountered: