diff --git a/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php b/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php index 67cf434c0..43c21ae59 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php @@ -60,14 +60,14 @@ class Point implements JsonSerializable { throw PointException::badJsonString($geojson); } - if ($a->type != "Point"){ + if ($a->type != 'Point'){ throw PointException::badGeoType(); - } else { - $lat = $a->coordinates[1]; - $lon = $a->coordinates[0]; - return Point::fromLonLat($lon, $lat); } + $lat = $a->coordinates[1]; + $lon = $a->coordinates[0]; + + return Point::fromLonLat($lon, $lat); } public static function fromLonLat(float $lon, float $lat): Point