Replies: 1 comment 3 replies
-
|
Could you create sample code at https://getrector.com/demo show what expected and what should happen? Thank you |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using CURL's
curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, 'progressCallback');to have a callback to monitor progress of a CURL call the callback function is supposed to have a signature like:If I'm only utilizing the $download_size and $downloaded portions of that call. The rector rule RemoveUnusedPrivateMethodParameterRector will remove the unused parameters, and then the callback will not match the expected form and an error will be thrown.
By changing from private to protected I avoid those being removed because there isn't a rector rule for RemoveUnusedProtected...
Is there a way to keep the function private and to keep the rule in place and have the rule not act on private callback functions where the signature of the function is controlled by code that you can't change? Or is the correct way to handle this to mark the method as protected?
Beta Was this translation helpful? Give feedback.
All reactions