From 282e5de115b9f2fa8add106657ab3ffd94209cca Mon Sep 17 00:00:00 2001 From: Kevin Ruscoe Date: Wed, 21 Aug 2019 11:55:13 +0100 Subject: [PATCH 1/2] Update Point.php Add toArray() helper --- src/Types/Point.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Types/Point.php b/src/Types/Point.php index 40719af4..3b2d7a50 100644 --- a/src/Types/Point.php +++ b/src/Types/Point.php @@ -38,6 +38,14 @@ public function setLng($lng) $this->lng = (float) $lng; } + public function toArray() + { + return [ + 'lat' => $this->getLat(), + 'lng' => $this->getLng() + ]; + } + public function toPair() { return $this->getLng().' '.$this->getLat(); From d0d944a4aee7460c6b2727555712d70cf20ece21 Mon Sep 17 00:00:00 2001 From: Kevin Ruscoe Date: Wed, 21 Aug 2019 11:56:42 +0100 Subject: [PATCH 2/2] Update Point.php --- src/Types/Point.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Types/Point.php b/src/Types/Point.php index 3b2d7a50..188bf9d1 100644 --- a/src/Types/Point.php +++ b/src/Types/Point.php @@ -42,7 +42,7 @@ public function toArray() { return [ 'lat' => $this->getLat(), - 'lng' => $this->getLng() + 'lng' => $this->getLng(), ]; }