spatie / period

Complex period comparisons
https://spatie.be/open-source
MIT License
1.6k stars 72 forks source link

add phpdoc/phpstan and open end for overlapsWith #51

Closed andreybolonin closed 5 years ago

andreybolonin commented 5 years ago

closes #41 @brendt if refactor overlapsWith seems ok. I will make changes for another methods.

brendt commented 5 years ago

I'm sorry but this PR changes too much stuff at once:

Also, you'll need to provide thorough explanations about refactors. Best is to open an issue to check whether we'd accept such an implementation before submitting a PR.

On the topic of doc blocks: we only add them when they are needed, meaning when type hints don't add the needed functionality.

On the topic of the open end implementation: by nesting if blocks three layers deep, the code becomes messy. I envisioned this feature to be added by creating a Period interface and providing an EndlessPeriod implementation, instead of adding complex if statements everywhere.

So I'm sorry but I'll be closing this PR.

andreybolonin commented 5 years ago

@brendt ok, no problem, thx for feedback.