Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Interesting point of view. I used to do "one line coding" and I like it but now I have a new mentor Jeffrey Way from Laravel and I am trying to follow his style. Beside PSR is violated this way. I did refactored my code based on some of the things I liked in your solution. I saw how you use static and self, did you did this for a purpose? Check this out leaseweb.com/labs/2014/04/static-versus-self-php
@k0pernikus Yup, I added some invalid ranges that will be discarded and removed the compareDateOnly as it turned out hours are not taken into consideration.