Back to Catalog
Code Smells
Dispensables
Lazy Class
Classes that do too little to justify their existence.
Intent & Description
'
π― Intent
Identify classes that don’t do enough to warrant being separate classes.
π Context
You have classes with very few methods or fields, or classes that have become redundant due to refactoring.
π‘ Solution
Merge the class into another class using Inline Class, or remove it entirely if it’s no longer needed.'
Real-world Use Case
Use when classes are too small or serve little purpose.
Source
π TL;DR
Classes that do too little should be merged into other classes or removed entirely.