@@ -93,7 +93,7 @@ |
||
| 93 | 93 | * |
| 94 | 94 | * @see ParserHook::getDefaultParameters |
| 95 | 95 | * |
| 96 | - * @return array |
|
| 96 | + * @return string[] |
|
| 97 | 97 | */ |
| 98 | 98 | protected function getDefaultParameters( $type ) { |
| 99 | 99 | return [ 'location', 'format', 'directional' ]; |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | * |
| 99 | 99 | * @param $type |
| 100 | 100 | * |
| 101 | - * @return array |
|
| 101 | + * @return string[] |
|
| 102 | 102 | */ |
| 103 | 103 | protected function getDefaultParameters( $type ) { |
| 104 | 104 | return [ 'distance', 'unit', 'decimals' ]; |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | * |
| 112 | 112 | * @see ParserHook::getDefaultParameters |
| 113 | 113 | * |
| 114 | - * @return array |
|
| 114 | + * @return string[] |
|
| 115 | 115 | */ |
| 116 | 116 | protected function getDefaultParameters( $type ) { |
| 117 | 117 | return [ 'location', 'bearing', 'distance' ]; |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | * |
| 105 | 105 | * @see ParserHook::getDefaultParameters |
| 106 | 106 | * |
| 107 | - * @return array |
|
| 107 | + * @return string[] |
|
| 108 | 108 | */ |
| 109 | 109 | protected function getDefaultParameters( $type ) { |
| 110 | 110 | return [ 'location' ]; |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | * |
| 114 | 114 | * @param $type |
| 115 | 115 | * |
| 116 | - * @return array |
|
| 116 | + * @return string[] |
|
| 117 | 117 | */ |
| 118 | 118 | protected function getDefaultParameters( $type ) { |
| 119 | 119 | return [ 'location1', 'location2', 'unit', 'decimals' ]; |
@@ -131,8 +131,6 @@ discard block |
||
| 131 | 131 | /** |
| 132 | 132 | * Message function that takes into account the language parameter. |
| 133 | 133 | * |
| 134 | - * @param string $key |
|
| 135 | - * @param ... $args |
|
| 136 | 134 | * |
| 137 | 135 | * @return string |
| 138 | 136 | */ |
@@ -193,7 +191,7 @@ discard block |
||
| 193 | 191 | * |
| 194 | 192 | * @see ParserHook::getDefaultParameters |
| 195 | 193 | * |
| 196 | - * @return array |
|
| 194 | + * @return string[] |
|
| 197 | 195 | */ |
| 198 | 196 | protected function getDefaultParameters( $type ) { |
| 199 | 197 | return [ 'service', 'language' ]; |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
| 172 | - * @return Location[] |
|
| 172 | + * @return \Generator |
|
| 173 | 173 | */ |
| 174 | 174 | public function getLocations(): iterable { |
| 175 | 175 | while ( ( $row = $this->queryResult->getNext() ) !== false ) { |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | /** |
| 411 | 411 | * Get the icon for a row. |
| 412 | 412 | * |
| 413 | - * @param array $row |
|
| 413 | + * @param SMWResultArray[] $row |
|
| 414 | 414 | * |
| 415 | 415 | * @return string |
| 416 | 416 | */ |
@@ -205,6 +205,10 @@ |
||
| 205 | 205 | return $location->getJSONObject(); |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | + /** |
|
| 209 | + * @param string $iconUrl |
|
| 210 | + * @param string $visitedIconUrl |
|
| 211 | + */ |
|
| 208 | 212 | private function getJsonForStaticLocations( array $staticLocations, array $params, $iconUrl, $visitedIconUrl ) { |
| 209 | 213 | $locationsJson = []; |
| 210 | 214 | |
@@ -19,6 +19,9 @@ |
||
| 19 | 19 | |
| 20 | 20 | private $geocoder; |
| 21 | 21 | |
| 22 | + /** |
|
| 23 | + * @param \Jeroen\SimpleGeocoder\Geocoders\Decorators\CoordinateFriendlyGeocoder $geocoder |
|
| 24 | + */ |
|
| 22 | 25 | public function __construct( $geocoder = null ) { |
| 23 | 26 | $this->geocoder = $geocoder instanceof Geocoder ? $geocoder : MapsFactory::newDefault()->getGeocoder(); |
| 24 | 27 | } |