| Total Complexity | 7 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class JtskObject implements IFormatted |
||
| 15 | { |
||
| 16 | /** @var float */ |
||
| 17 | protected float $x = 0.0; |
||
| 18 | /** @var float */ |
||
| 19 | protected float $y = 0.0; |
||
| 20 | /** @var float */ |
||
| 21 | protected float $z = 0.0; |
||
| 22 | |||
| 23 | 4 | public function setData($x = '0', $y = '0', $z = '0'): IFormatted |
|
| 24 | { |
||
| 25 | 4 | $this->x = is_null($x) ? $this->x : floatval($x); |
|
| 26 | 4 | $this->y = is_null($y) ? $this->y : floatval($y); |
|
| 27 | 4 | $this->z = is_null($z) ? $this->z : floatval($z); |
|
| 28 | 4 | return $this; |
|
| 29 | } |
||
| 30 | |||
| 31 | 4 | public function getLongitude(): float |
|
| 32 | { |
||
| 33 | 4 | return $this->x; |
|
| 34 | } |
||
| 35 | |||
| 36 | 4 | public function getLatitude(): float |
|
| 37 | { |
||
| 38 | 4 | return $this->y; |
|
| 39 | } |
||
| 40 | |||
| 41 | 1 | public function getAltitude(): float |
|
| 44 | } |
||
| 45 | } |
||
| 46 |