Skip to content

Commit 6603358

Browse files
MechazawaNyholm
authored andcommitted
Add Coordinates::toArray (#817)
* Add Coordinates::toArray * lint * Flip lat, long to long lat
1 parent a6a5318 commit 6603358

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Model/Coordinates.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,14 @@ public function getLongitude(): float
6767
{
6868
return $this->longitude;
6969
}
70+
71+
/**
72+
* Returns the coordinates as a tuple
73+
*
74+
* @return array
75+
*/
76+
public function toArray(): array
77+
{
78+
return [$this->getLongitude(), $this->getLatitude()];
79+
}
7080
}

0 commit comments

Comments
 (0)