Skip to content

Commit

Permalink
Check isset on parcel coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-falda committed Mar 1, 2024
1 parent b5c7dae commit 1ff46bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Response/DTO/ParcelShop.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1ff46bb

Please sign in to comment.