Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 643 Bytes

File metadata and controls

34 lines (24 loc) · 643 Bytes

GCop 112

"This class is too large. Break its responsibilities down into more classes."

Rule description

When classes get too big, it is likely they have too many responsibilities and it is against SOLID first rule which is having a Single responsibility.

Consider breaking the class into two or more classes, each with specific responsibilities.

Your ultimate goal should be to achieve a highly cohesive set of small classes.

Example

public class Foo
{
    // Multiple methods, and more than 1000 lines
}

should be 🡻

public class Foo1
{
    // ...
}

public class Foo2
{
    // ...
}