-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add a standard way to indicate that a parameter is unused #1
Comments
cc @ondrejmirtes @muglug @staabm - I can see this being useful to avoid the need to rename parameters to suppress warnings for individual parameters, as well as to avoid different suppression annotations for different tools |
When named parameters are a thing with php8 renaming a parameter could be a bc break, therefore using a annotation to indicate this sounds more robust. 👍 |
Also, it seems like it would be unnecessarily duplication to need to specify the type, and some tools might treat leaving out the type ( So adding a new annotation such as
|
Such as
@param Type $paramName description @unused-param
(on a single line after $paramName)(Phan uses
@phan-unused-param
. It suppresses warnings about unused params/variables starting with$unused
or with a name of$_
)The text was updated successfully, but these errors were encountered: