Skip to content

Commit 0fc6051

Browse files
committed
chore: small validation improvement for a more intuitive error message
1 parent c44229d commit 0fc6051

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Endpoint/AirPollutionEndpoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function getHistory(
9292
Validator::range(-90, 90)->assert($latitude, 'latitude');
9393
Validator::range(-180, 180)->assert($longitude, 'longitude');
9494
Validator::lessThan(new \DateTime('now'))->assert($endDate, 'endDate');
95-
Validator::lessThan($endDate)->assert($startDate, 'startDate');
95+
Validator::greaterThan($startDate)->assert($endDate, 'endDate');
9696

9797
$timezoneUtc = new \DateTimeZone('UTC');
9898

0 commit comments

Comments
 (0)