| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Coordinates |
||
| 6 | { |
||
| 7 | private CoordinatesLongitude $longitude; |
||
| 8 | private CoordinatesLatitude $latitude; |
||
| 9 | |||
| 10 | 3 | private function __construct(CoordinatesLongitude $longitude, CoordinatesLatitude $latitude) |
|
| 14 | 3 | } |
|
| 15 | |||
| 16 | 3 | public static function fromValues(float $longitude, float $latitude): Coordinates |
|
| 17 | { |
||
| 18 | 3 | return new self( |
|
| 19 | 3 | CoordinatesLongitude::fromValue($longitude), |
|
| 20 | 3 | CoordinatesLatitude::fromValue($latitude) |
|
| 21 | ); |
||
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function longitude(): CoordinatesLongitude |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | public function latitude(): CoordinatesLatitude |
|
| 32 | } |
||
| 33 | } |
||
| 34 |