| 1 | <?php |
||
| 20 | final class Coordinates |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var float |
||
| 24 | */ |
||
| 25 | private $latitude; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var float |
||
| 29 | */ |
||
| 30 | private $longitude; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param float $latitude |
||
| 34 | * @param float $longitude |
||
| 35 | */ |
||
| 36 | 17 | public function __construct($latitude, $longitude) |
|
| 50 | |||
| 51 | /** |
||
| 52 | * Returns the latitude. |
||
| 53 | * |
||
| 54 | * @return float |
||
| 55 | */ |
||
| 56 | 14 | public function getLatitude(): float |
|
| 60 | |||
| 61 | /** |
||
| 62 | * Returns the longitude. |
||
| 63 | * |
||
| 64 | * @return float |
||
| 65 | */ |
||
| 66 | 14 | public function getLongitude(): float |
|
| 70 | |||
| 71 | /** |
||
| 72 | * Returns the coordinates as a tuple |
||
| 73 | * |
||
| 74 | * @return array |
||
| 75 | */ |
||
| 76 | public function toArray(): array |
||
| 80 | } |
||
| 81 |