CRITICAL
Rule Definition
For maintainability and readability reasons, interfaces should not have too many methods.
Remediation
Review the architecture of the application to reduce the number of methods in an Interface.
Violation Code Sample
interface iTemplateCastExample
{
public function setVariable1($name1, $var1);
public function setVariable2($name2, $var2);
public function setVariable3($name3, $var3);
public function setVariable4($name4, $var4);
//... many other methods
public function setVariable30($name30, $var30);
public function setVariable31($name31, $var31);
}
Related Technologies
Technical Criterion
Complexity - OO Inheritance and Polymorphism
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.