From 1ff46bb07962b32ae568942ec81a736dd9afb126 Mon Sep 17 00:00:00 2001 From: Lukasz Falda Date: Fri, 1 Mar 2024 07:18:13 +0100 Subject: [PATCH] Check isset on parcel coordinates --- src/Response/DTO/ParcelShop.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Response/DTO/ParcelShop.php b/src/Response/DTO/ParcelShop.php index 959cd00..229ff50 100644 --- a/src/Response/DTO/ParcelShop.php +++ b/src/Response/DTO/ParcelShop.php @@ -29,7 +29,7 @@ public function addWorkingHours(WorkingHours $workingHours): void public function getCoordinates(): ?Coordinates { - return null !== $this->geoLat && null !== $this->geoLong + return isset($this->geoLat, $this->geoLong) ? new Coordinates($this->geoLat, $this->geoLong) : null; }