Skip to content

Commit

Permalink
Geometry::fromArray, add $srid parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ju-gow authored Apr 2, 2024
1 parent 568aba4 commit 950170f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Objects/Geometry.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ public static function fromJson(string $geoJson, int|Srid $srid = 0): static
*
* @throws JsonException
*/
public static function fromArray(array $geometry): static
public static function fromArray(array $geometry, int|Srid $srid = 0): static
{
$geoJson = json_encode($geometry, JSON_THROW_ON_ERROR);

return static::fromJson($geoJson);
return static::fromJson($geoJson, $srid);
}

/**
Expand Down

0 comments on commit 950170f

Please sign in to comment.