@@ -72,7 +72,7 @@ |
||
| 72 | 72 | /** |
| 73 | 73 | * This function returns the definitions for the parameters used by every map feature. |
| 74 | 74 | * |
| 75 | - * @return array |
|
| 75 | + * @return \ParamProcessor\IParamDefinition[] |
|
| 76 | 76 | */ |
| 77 | 77 | public static function getCommonParameters() { |
| 78 | 78 | $params = []; |
@@ -2,9 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Maps; |
| 4 | 4 | |
| 5 | -use ImagePage; |
|
| 6 | -use Maps\DataAccess\MediaWikiFileUrlFinder; |
|
| 7 | -use Title; |
|
| 8 | 5 | use Xml; |
| 9 | 6 | |
| 10 | 7 | /** |
@@ -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 | */ |
@@ -136,6 +136,10 @@ |
||
| 136 | 136 | return $locationJsonObjects; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | + /** |
|
| 140 | + * @param string $iconUrl |
|
| 141 | + * @param string $visitedIconUrl |
|
| 142 | + */ |
|
| 139 | 143 | private function getLocationJsonObject( Location $location, array $params, $iconUrl, $visitedIconUrl ) { |
| 140 | 144 | $jsonObj = $location->getJSONObject( $params['title'], $params['label'], $iconUrl, '', '', $visitedIconUrl ); |
| 141 | 145 | |
@@ -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 | |
@@ -6,7 +6,6 @@ discard block |
||
| 6 | 6 | use Html; |
| 7 | 7 | use Linker; |
| 8 | 8 | use Maps\Elements\BaseElement; |
| 9 | -use Maps\Elements\Line; |
|
| 10 | 9 | use Maps\Elements\Location; |
| 11 | 10 | use Maps\FileUrlFinder; |
| 12 | 11 | use Maps\MappingService; |
@@ -17,7 +16,6 @@ discard block |
||
| 17 | 16 | use Maps\Presentation\WikitextParsers\LocationParser; |
| 18 | 17 | use ParamProcessor\ParamDefinition; |
| 19 | 18 | use Parser; |
| 20 | -use ParserOptions; |
|
| 21 | 19 | use SMW; |
| 22 | 20 | use SMWOutputs; |
| 23 | 21 | use SMWQueryResult; |
@@ -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 | } |