- You have a method that returns a value but also changes something inside an object. This method implements Command and Query Responsibility Segregation. This principle tells us to separate code responsible for getting data from code that changes something inside an object.
- The name is clear readable, understandable and easy to maintain.
- Change reference to value
Before
