| @@ 78-88 (lines=11) @@ | ||
| 75 | /** |
|
| 76 | * {@inheritdoc} |
|
| 77 | */ |
|
| 78 | public function reverse(float $latitude, float $longitude): Collection |
|
| 79 | { |
|
| 80 | $query = ReverseQuery::fromCoordinates($latitude, $longitude) |
|
| 81 | ->withLimit($this->limit); |
|
| 82 | ||
| 83 | if (!empty($this->locale)) { |
|
| 84 | $query = $query->withLocale($this->locale); |
|
| 85 | } |
|
| 86 | ||
| 87 | return $this->provider->reverseQuery($query); |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * {@inheritdoc} |
|
| @@ 111-119 (lines=9) @@ | ||
| 108 | /** |
|
| 109 | * {@inheritdoc} |
|
| 110 | */ |
|
| 111 | public function reverseQuery(ReverseQuery $query): Collection |
|
| 112 | { |
|
| 113 | $locale = $query->getLocale(); |
|
| 114 | if (empty($locale) && null !== $this->locale) { |
|
| 115 | $query = $query->withLocale($this->locale); |
|
| 116 | } |
|
| 117 | ||
| 118 | return $this->provider->reverseQuery($query); |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * @param string $locale |
|