Conditions | 9 |
Paths | 20 |
Total Lines | 21 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 9 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | 6 | public function render(Marker $marker): ?string |
|
32 | { |
||
33 | 6 | $options = $marker->hasStaticOption('styles') ? $marker->getStaticOption('styles') : []; |
|
34 | |||
35 | 6 | if ($marker->hasIcon()) { |
|
36 | 1 | $icon = $marker->getIcon(); |
|
37 | |||
38 | 1 | if (!isset($options['icon']) && Icon::DEFAULT_URL !== ($url = $icon->getUrl())) { |
|
39 | 1 | $options['icon'] = $url; |
|
40 | } |
||
41 | |||
42 | 1 | if (!isset($options['anchor']) && $icon->hasAnchor()) { |
|
43 | 1 | $options['anchor'] = $icon->getAnchor(); |
|
44 | } |
||
45 | } |
||
46 | |||
47 | 6 | if (isset($options['anchor']) && $options['anchor'] instanceof Point) { |
|
48 | 1 | $options['anchor'] = $this->pointRenderer->render($options['anchor']); |
|
49 | } |
||
50 | |||
51 | 6 | return $this->renderStyle($options); |
|
52 | } |
||
54 |