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