Battling code duplication in the Report class (PR #610)

  • the reports mainly followed the same structure but with different classes, so I took the code and a class as its parameter
  • the method on which is generated may change but mostly is count_per_day so made that optional
  • grouped the refactored methods to the top, some unrefactored methods remain but those are a bit harder to refactor, and not as reusable so I’d like to get this through first
  • Overall I believe this patch enhances maintainability :slight_smile:

I already signed the contribution thingy :slight_smile:

edit: Oh yeah this is the Code Climate smell I was targetting

Cheers, Tobi


You’ve signed the CLA, PragTob. Thank you! This pull request is ready for review.