Skip to content

Commit

Permalink
Update GeojsonParser.php
Browse files Browse the repository at this point in the history
Fix the typo in the protected function named `parseGeomeryCollection`.
  • Loading branch information
cesarkohl authored Jul 6, 2023
1 parent eb17e22 commit 0916950
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/IO/Parser/Geojson/GeojsonParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public function parse($input): Geometry
'MultiPolygon' => $this->parseMultiPolygon($input['coordinates']),
'Point' => $this->parsePoint($input['coordinates']),
'Polygon' => $this->parsePolygon($input['coordinates']),
'GeometryCollection' => $this->parseGeomeryCollection($input),
'GeometryCollection' => $this->parseGeometryCollection($input),
'FeatureCollection' => throw new \RuntimeException('Invalid GeoJSON: The type FeatureCollection is not supported'),
default => throw new \RuntimeException("Invalid GeoJSON: Invalid GeoJSON type $type"),
};
}

protected function parseGeomeryCollection(array $geometryCollectionData): Geometry
protected function parseGeometryCollection(array $geometryCollectionData): Geometry
{
$geometries = $geometryCollectionData['geometries'];
$geometries = array_map(fn (array $geometry) => $this->parse($geometry), $geometries);
Expand Down

0 comments on commit 0916950

Please sign in to comment.