Open gvieiragoulart opened 1 month ago
@gvieiragoulart I approved the CI run. There are some static analysis checks you'll need to fix before we can merge this!
I'll keep an eye here to approve the CI run again as soon as you fix them, and once it passes, I'll do a full review!
Attention: Patch coverage is 94.11765%
with 5 lines
in your changes missing coverage. Please review.
Project coverage is 97.28%. Comparing base (
d7dc0f2
) to head (906f722
). Report is 3 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
library/Rules/DateTimeDiff.php | 93.22% | 4 Missing :warning: |
library/Helpers/CanExtractRules.php | 93.75% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Resolves https://github.com/Respect/Validation/issues/1462
What?
This PR introduces a new validation rule, DateTimeDiff wich validates the difference of date/time against a specific rule.
The
$type
argument on our construct should follow PHP's DateInterval properties. So we can use types such as year, months,days,full days,hours,minutes,seconds,microseconds.Note: This is my first PR in a relatively large open-source project, so if I've done anything incorrectly, please let me know. :+1: