Skip to content

Commit

Permalink
Merge pull request #14 from answear/NOISSUE-check-isset-on-parcel-coo…
Browse files Browse the repository at this point in the history
…rdinates

Check isset on parcel coordinates
  • Loading branch information
lukasz-falda authored Mar 1, 2024
2 parents b5c7dae + 1ff46bb commit cb7a03c
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 cb7a03c

Please sign in to comment.