CRITICAL
Rule Definition
A Class with too many Methods is probably a good target for refactoring to reduce its complexity and find a way to have more fine grained objects.
Remediation
Modify the source code of the class to reduce the number of methods.
Violation Code Sample
class CastExample
{
public function test1() {}
public function test2() {}
public function test3() {}
public function test4() {}
[... many more methods...]
public function test9() {}
public function test10() {}
public function test11() {}
}
Reference
PHPMD - http://phpmd.org/rules/codesize.html#excessivepubliccount
Related Technologies
Technical Criterion
Programming Practices - 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.