Rule Definition
For readability reasons, Functions and Methods should not contain lines with more than 120 characters.
Remediation
Modify the source code to reduce the number of Functions and Methods containing lines of more than 120 characters.
Violation Code Sample
class CastTest{
var $items;
var $Var1;
var $Var2;
var $Var3;
// Add of the Item
function add_item($artnr, $num) { $this->items[$artnr] += $num;$Var1 =$Var1+1;$Var2 =$Var2+1;$Var3 =$Var3+1;$Var2 =$Var2+1;$Var3 =$Var3+1; }
}
Fixed Code Sample
class CastTest{
var $items;
var $Var1;
var $Var2;
var $Var3;
// Add of the Item
function add_item($artnr, $num)
{ $this->items[$artnr] += $num;
$Var1 =$Var1+1;
$Var2 =$Var2+1;
$Var3 =$Var3+1;
$Var2 =$Var2+1;
$Var3 =$Var3+1;
}
}
Related Technologies
Technical Criterion
Documentation - Style 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.