Week 32, year 2014
- Resolving Feature Envy in the Domain - Benjamin Eberlei did a really nice job of explaining refactoring the Feature Envy code smell on his blog. I wrote a comment because I felt the example could be taken one step further. You should read the original post. Below are Benjamin’s code examples (for reference), followed by a repost of my comment. Original examples <?phpfunctioncalculateReport(DateTime$start,$days){if($days<0){thrownewInvalidArgumentException($days);}$endDate=clone$start;$endDate->modify('+'. $days. [Mathias Verraes]