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