CRITICAL
Rule Definition
Classes that implement too many interfaces increase the complexity of the source code and makes it difficult to maintain and test.
Remediation
Review the architecture of the application to reduce the number of interface implementations by the class.
Violation Code Sample
interface a
{
public function a();
}
interface b
{
public function b();
}
// several other interfaces
class m
{
public function m()
{
}
}
class ClassTest implements a,b,c,...,l,m
{
public function a()
{
}
public function b()
{
}
// several others methods
public function m()
{
}
}
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.