Skip to content

Use DateTimeInterface in parameter type hints when nothing more specific is needed

Jano requested to merge use_date_time_interface into master

Some methods used an explicit DateTime or even Carbon type hint without using functionality specific to them.

This makes those methods usable in more cases. Restricting them to Carbon restricted their use cases.

Returning a Carbon on the other hand is good, because that gives you more possibilities.

Merge request reports