Disallows use of super global variables.
Disallows use of variable variables.
Looks for duplicate assignments to a variable.
Looks for unused variables.
Sniff provides the following settings:
ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach(default:false): ignore unused$valuein foreach when only$keyis used
foreach ($values as $key => $value) {
echo $key;
}Looks for useless variables.