| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | 29 | public function toJson( MapData $mapData ): array { |
|
| 10 | 29 | $json = $mapData->getParameters(); |
|
| 11 | |||
| 12 | 29 | $json['locations'] = array_merge( |
|
| 13 | 29 | array_key_exists( 'locations', $json ) ? $json['locations'] : [], |
|
| 14 | 29 | $this->getLocationJson( $mapData ) |
|
| 15 | ); |
||
| 16 | |||
| 17 | 29 | return $json; |
|
| 18 | } |
||
| 19 | |||
| 35 |