| Total Complexity | 15 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Coverage | 62.07% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Coordinates implements CoordinatesInterface |
||
| 10 | { |
||
| 11 | private float $latitude; |
||
| 12 | private float $longitude; |
||
| 13 | |||
| 14 | 5 | public function __construct($latitude, $longitude) |
|
| 15 | { |
||
| 16 | 5 | $this->setLatitudeIsValid($latitude); |
|
| 17 | 3 | $this->setLongitudeIsValid($longitude); |
|
| 18 | 3 | } |
|
| 19 | |||
| 20 | public function getLatitude(): float |
||
| 21 | { |
||
| 22 | return $this->latitude; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getLongitude(): float |
||
| 28 | } |
||
| 29 | |||
| 30 | public function toArray(): array |
||
| 31 | { |
||
| 32 | return [$this->getLongitude(), $this->getLatitude()]; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function toString(): string |
||
| 38 | } |
||
| 39 | |||
| 40 | 5 | private function setLatitudeIsValid($latitude): void |
|
| 55 | 3 | } |
|
| 56 | |||
| 57 | 3 | private function setLongitudeIsValid($longitude): void |
|
| 72 | 3 | } |
|
| 73 | } |
||
| 74 |