1.2.847. No Variable Needed¶
This analysis reports methods where the local variables are not needed.
Such variables may be used to improve readability.
<?php
// The variable is not strictly necessary here
function foo($a) {
$k = $a->method(1, 0);
return $k;
}
?>
1.2.847.1. Suggestions¶
Remove the variable
1.2.847.2. Specs¶
Short name |
Variables/NoVariableNeeded |
Rulesets |
|
Exakat since |
2.5.0 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
High |
Available in |