Skip to content
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

Feature Request: don't report on unused parameters for deprecated functions #302

Open
jrfnl opened this issue May 9, 2023 · 0 comments
Open

Comments

@jrfnl
Copy link
Collaborator

jrfnl commented May 9, 2023

/**
 * Function description.
 *
 * @deprecated #.#
 */
function foo($old_param, $another_old_param) {
    trigger_error('Deprecated function, use ... instead', E_USER_DEPRECATED);
    something_else($old_param);
}

The above code sample would trigger the following warning:

 8 | WARNING | Unused function parameter $another_old_param.
   |         | (VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable)

... while I would expect no warning as the function is deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant