From 905a2b166728f86a88c93f6e2add08c0b2d4b938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gamez?= Date: Wed, 19 Jan 2022 15:35:29 +0100 Subject: [PATCH] Fix error message when providing an invalid longitude --- CHANGELOG.md | 4 ++++ src/Geohash.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16e3f08..1ebd951 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased] +### Fixed + +* Fixed error message when providing an invalid longitude + ## [1.0.0] - 2022-01-19 Initial release diff --git a/src/Geohash.php b/src/Geohash.php index bac8789..87b7c3d 100644 --- a/src/Geohash.php +++ b/src/Geohash.php @@ -34,7 +34,7 @@ public static function encode(float $lat, float $lon, ?int $precision = null): s } if ($lon < $lonMin || $lon > $lonMax) { - throw new InvalidArgumentException("The longitude must be between $latMin and $latMax"); + throw new InvalidArgumentException("The longitude must be between $lonMin and $lonMax"); } if (($precision !== null) && ($precision < $precisionMin || $precision > $precisionMax)) {