Rule Definition
Source code containing long variable names is difficult to read and therefore to maintain.
Remediation
Modify the source code to reduce the number of artifacts with variable names that are too long.
Violation Code Sample
class CastExample
{
protected $reallyLongIntName = -6; // VIOLATION - Field
public static function main( array $argumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -7; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 20;
$interestingIntIndex++ ) {
}
}
}
Reference
PHPMD http://phpmd.org/rules/naming.html#longvariable
Related Technologies
Technical Criterion
Documentation - Naming Convention Conformity
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.