| Conditions | 9 |
| Paths | 20 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 9 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 24 | public function render(Marker $marker) |
|
| 38 | { |
||
| 39 | 24 | $options = $marker->hasStaticOption('styles') ? $marker->getStaticOption('styles') : []; |
|
| 40 | |||
| 41 | 24 | if ($marker->hasIcon()) { |
|
| 42 | 4 | $icon = $marker->getIcon(); |
|
| 43 | |||
| 44 | 4 | if (!isset($options['icon']) && Icon::DEFAULT_URL !== ($url = $icon->getUrl())) { |
|
| 45 | 4 | $options['icon'] = $url; |
|
| 46 | } |
||
| 47 | |||
| 48 | 4 | if (!isset($options['anchor']) && $icon->hasAnchor()) { |
|
| 49 | 4 | $options['anchor'] = $icon->getAnchor(); |
|
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | 24 | if (isset($options['anchor']) && $options['anchor'] instanceof Point) { |
|
| 54 | 4 | $options['anchor'] = $this->pointRenderer->render($options['anchor']); |
|
| 55 | } |
||
| 56 | |||
| 57 | 24 | return $this->renderStyle($options); |
|
| 58 | } |
||
| 59 | } |
||
| 60 |