PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: Suspicious variable/parameter name combination

Last modified: 21 March 2023

Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it.

Example:

or

Here the inspection guesses that x and y are mixed up.

Specify the names that should not be used together. An error is reported if a parameter name or an assignment target name contains words from one group while the name of the assigned or passed variable contains words from another group.