| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | public function getJSONObject( string $defText = '', string $defTitle = '' ): array { |
||
| 56 | $parentArray = parent::getJSONObject( $defText, $defTitle ); |
||
| 57 | $posArray = []; |
||
| 58 | |||
| 59 | foreach ( $this->coordinates as $mapLocation ) { |
||
| 60 | $posArray[] = [ |
||
| 61 | 'lat' => $mapLocation->getLatitude(), |
||
| 62 | 'lon' => $mapLocation->getLongitude() |
||
| 63 | ]; |
||
| 64 | } |
||
| 65 | |||
| 66 | $posArray = [ 'pos' => $posArray ]; |
||
| 67 | |||
| 68 | return array_merge( $parentArray, $posArray ); |
||
| 69 | } |
||
| 70 | |||
| 72 |