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; }