| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function getLocationName(?float $lat, ?float $lng):?string |
||
| 27 | { |
||
| 28 | if ($lat === null || $lng === null) { |
||
| 29 | return null; |
||
| 30 | } |
||
| 31 | $neighbourhood = $this |
||
| 32 | ->neighbourhoodRepository |
||
| 33 | ->findByLatlng($lat, $lng); |
||
| 34 | |||
| 35 | if ($neighbourhood === null) { |
||
| 36 | return null; |
||
| 37 | } else { |
||
| 38 | return $neighbourhood->getLsoa11ln(); |
||
| 39 | } |
||
| 41 | } |