Conditions | 5 |
Paths | 9 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 0 |
1 | <?php |
||
35 | public function handleMap(StaticMapEvent $event) |
||
36 | { |
||
37 | $map = $event->getMap(); |
||
38 | |||
39 | if ($map->hasStaticOption('center')) { |
||
40 | $center = $map->getStaticOption('center'); |
||
41 | } elseif (!$map->isAutoZoom()) { |
||
42 | $center = $map->getCenter(); |
||
43 | } |
||
44 | |||
45 | if (isset($center)) { |
||
46 | if ($center instanceof Coordinate) { |
||
47 | $center = $this->coordinateRenderer->render($center); |
||
48 | } |
||
49 | |||
50 | $event->setParameter('center', $center); |
||
51 | } |
||
52 | } |
||
53 | |||
62 |