| Total Complexity | 3 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | class LatLng extends AbstractObject { |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var float |
||
| 26 | */ |
||
| 27 | protected $lat = 0; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var float |
||
| 31 | */ |
||
| 32 | protected $lng = 0; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var array |
||
| 36 | */ |
||
| 37 | protected $typeCheck = [ |
||
| 38 | LatLngFields::LAT => 'float', |
||
| 39 | LatLngFields::LNG => 'float', |
||
| 40 | ]; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Return the latitude, 0 if null |
||
| 44 | * |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function getLat(): string { |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Return the longitude, 0 if null |
||
| 54 | * |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | public function getLng(): string { |
||
| 58 | |||
| 59 | return $this->lng ?? 0; |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public function __toString(): string { |
||
| 70 | ]); |
||
| 71 | } |
||
| 73 | } |