| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | private function locationToKmlPlacemark( Location $location ): string { |
||
| 44 | // TODO: escaping? |
||
| 45 | $name = '<name><![CDATA[ ' . $location->getTitle() . ']]></name>'; |
||
| 46 | |||
| 47 | // TODO: escaping? |
||
| 48 | $description = '<description><![CDATA[ ' . $location->getText() . ']]></description>'; |
||
| 49 | |||
| 50 | $coordinates = '<coordinates>' . htmlspecialchars( $this->getCoordinateString( $location ) ) . '</coordinates>'; |
||
| 51 | |||
| 52 | return <<<EOT |
||
| 53 | <Placemark> |
||
| 54 | $name |
||
| 55 | $description |
||
| 56 | <Point> |
||
| 57 | $coordinates |
||
| 58 | </Point> |
||
| 59 | </Placemark> |
||
| 60 | |||
| 61 | EOT; |
||
| 62 | } |
||
| 63 | |||
| 72 |