Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function render(Polyline $polyline) |
||
42 | { |
||
43 | if ($polyline->hasStaticOption('locations')) { |
||
44 | $locations = $polyline->getStaticOption('locations'); |
||
45 | } else { |
||
46 | $locations = $polyline->getCoordinates(); |
||
47 | } |
||
48 | |||
49 | return implode('|', array_map(function ($location) { |
||
50 | return $location instanceof Coordinate ? $this->coordinateRenderer->render($location) : $location; |
||
51 | }, $locations)); |
||
52 | } |
||
53 | } |
||
54 |