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