Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
18 | final class Coordinates implements Arrayable |
||
19 | { |
||
20 | /** @var float */ |
||
21 | private $latitude; |
||
22 | |||
23 | /** @var float */ |
||
24 | private $longitude; |
||
25 | |||
26 | public static function create(float $latitude, float $longitude): self |
||
27 | { |
||
28 | return new self(...\func_get_args()); |
||
29 | } |
||
30 | |||
31 | public function __construct(float $latitude, float $longitude) |
||
32 | { |
||
33 | $this->latitude = $latitude; |
||
34 | $this->longitude = $longitude; |
||
35 | } |
||
36 | |||
37 | public function getLatitude(): float |
||
40 | } |
||
41 | |||
42 | public function getLongitude(): float |
||
43 | { |
||
44 | return $this->longitude; |
||
45 | } |
||
46 | |||
47 | public function toArray(): array |
||
52 | ]; |
||
53 | } |
||
54 | } |
||
55 |