All the smells in this group contribute to excessive coupling between classes or show what happens if coupling is replaced by excessive delegation.
A method accesses the data of another object more than its own data.
This smell may occur after fields are moved to a data class. If this is the case, you may want to move the operations on data to this class as well.
Move Method
Extract Method
One class uses the internal fields and methods of another class.
In code you see a series of calls resembling $a->b()->c()->d().
$a->b()->c()->d()
Hide Delegate
If a class performs only one action, delegating work to another class, why does it exist at all?
If most of a method’s classes delegate to another class, Remove Middle Man is in order.
Last updated 4 years ago