| 1 | <?php |
||
| 10 | final class Coordinates |
||
| 11 | { |
||
| 12 | private $latitude; |
||
| 13 | private $longitude; |
||
| 14 | private $accuracyMeters; |
||
| 15 | |||
| 16 | 12 | public function __construct(float $latitude, float $longitude, float $accuracyMeters) |
|
| 24 | |||
| 25 | 6 | public function getLatitude(): float |
|
| 29 | |||
| 30 | 6 | public function getLongitude(): float |
|
| 34 | |||
| 35 | 6 | public function getAccuracyMeters(): float |
|
| 39 | |||
| 40 | 12 | private function validateLatitude(float $latitude): void |
|
| 46 | |||
| 47 | 10 | private function validateLongitude(float $longitude): void |
|
| 53 | |||
| 54 | 12 | private function isNumericInBounds(float $value, float $min, float $max): bool |
|
| 62 | } |
||
| 63 |