| Conditions | 4 |
| Paths | 6 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 96 | public function handleMap(StaticMapEvent $event) |
|
| 41 | { |
||
| 42 | 96 | $map = $event->getMap(); |
|
| 43 | |||
| 44 | 96 | if ($map->hasStaticOption('center')) { |
|
| 45 | 4 | $center = $map->getStaticOption('center'); |
|
| 46 | 94 | } elseif (!$map->isAutoZoom()) { |
|
| 47 | 72 | $center = $this->coordinateRenderer->render($map->getCenter()); |
|
| 48 | 36 | } |
|
| 49 | |||
| 50 | 96 | if (isset($center)) { |
|
| 51 | 76 | $event->setParameter('center', $center); |
|
| 52 | 38 | } |
|
| 53 | 96 | } |
|
| 54 | |||
| 63 |