Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
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>' |
||
51 | . $this->escapeValue( $this->getCoordinateString( $location ) ) |
||
52 | . '</coordinates>'; |
||
53 | |||
54 | return <<<EOT |
||
55 | <Placemark> |
||
56 | $name |
||
57 | $description |
||
58 | <Point> |
||
59 | $coordinates |
||
60 | </Point> |
||
61 | </Placemark> |
||
62 | |||
63 | EOT; |
||
64 | } |
||
65 | |||
78 |