Conditions | 5 |
Paths | 9 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function handleMap(StaticMapEvent $event): void |
||
33 | { |
||
34 | $map = $event->getMap(); |
||
35 | |||
36 | if ($map->hasStaticOption('center')) { |
||
37 | $center = $map->getStaticOption('center'); |
||
38 | } elseif (!$map->isAutoZoom()) { |
||
39 | $center = $map->getCenter(); |
||
40 | } |
||
41 | |||
42 | if (isset($center)) { |
||
43 | if ($center instanceof Coordinate) { |
||
44 | $center = $this->coordinateRenderer->render($center); |
||
45 | } |
||
46 | |||
47 | $event->setParameter('center', $center); |
||
48 | } |
||
57 |