Skip to content

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

Description

@jrfnl
/**
 * 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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions