| Total Complexity | 7 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class DegreesObject implements IFormatted |
||
| 15 | { |
||
| 16 | /** @var string X +-180° */ |
||
| 17 | protected string $longitude = '0'; |
||
| 18 | /** @var string Y +-90° */ |
||
| 19 | protected string $latitude = '0'; |
||
| 20 | /** @var string Z +-10000m */ |
||
| 21 | protected string $altitude = '0'; |
||
| 22 | |||
| 23 | 17 | public function setData($longitude = '0', $latitude = '0', $altitude = '0'): IFormatted |
|
| 24 | { |
||
| 25 | 17 | $this->longitude = is_null($longitude) ? $this->longitude : strval($longitude); |
|
| 26 | 17 | $this->latitude = is_null($latitude) ? $this->latitude : strval($latitude); |
|
| 27 | 17 | $this->altitude = is_null($altitude) ? $this->altitude : strval($altitude); |
|
| 28 | 17 | return $this; |
|
| 29 | } |
||
| 30 | |||
| 31 | 17 | public function getLongitude(): string |
|
| 32 | { |
||
| 33 | 17 | return $this->longitude; |
|
| 34 | } |
||
| 35 | |||
| 36 | 16 | public function getLatitude(): string |
|
| 39 | } |
||
| 40 | |||
| 41 | 12 | public function getAltitude(): string |
|
| 46 |