@@ -19,6 +19,9 @@ |
||
19 | 19 | private $pageContentFetcher; |
20 | 20 | private $defaultNamespace; |
21 | 21 | |
22 | + /** |
|
23 | + * @param FileFetcher $fileFetcher |
|
24 | + */ |
|
22 | 25 | public function __construct( $fileFetcher = null, PageContentFetcher $pageContentFetcher = null ) { |
23 | 26 | $this->fileFetcher = $fileFetcher instanceof FileFetcher |
24 | 27 | ? $fileFetcher : MapsFactory::newDefault()->getFileFetcher(); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | /** |
57 | 57 | * @param string $serviceName |
58 | - * @param array $aliases |
|
58 | + * @param string[] $aliases |
|
59 | 59 | */ |
60 | 60 | public function __construct( $serviceName, array $aliases = [] ) { |
61 | 61 | $this->serviceName = $serviceName; |
@@ -72,6 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @since 0.6.3 |
75 | + * @param string $featureName |
|
75 | 76 | */ |
76 | 77 | public function addFeature( $featureName, $handlingClass ) { |
77 | 78 | $this->features[$featureName] = $handlingClass; |
@@ -180,6 +181,7 @@ discard block |
||
180 | 181 | |
181 | 182 | /** |
182 | 183 | * @since 0.6.3 |
184 | + * @param string $alias |
|
183 | 185 | */ |
184 | 186 | public function hasAlias( $alias ) { |
185 | 187 | return in_array( $alias, $this->aliases ); |
@@ -190,7 +192,7 @@ discard block |
||
190 | 192 | * |
191 | 193 | * @since 0.7.3 |
192 | 194 | * |
193 | - * @param mixed $modules Array of string or string |
|
195 | + * @param string[] $modules Array of string or string |
|
194 | 196 | */ |
195 | 197 | public function addResourceModules( $modules ) { |
196 | 198 | $this->resourceModules = array_merge( $this->resourceModules, (array)$modules ); |
@@ -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 |
@@ -10,7 +10,6 @@ |
||
10 | 10 | use Maps\Presentation\WikitextParser; |
11 | 11 | use Maps\Presentation\WikitextParsers\LocationParser; |
12 | 12 | use Parser; |
13 | -use ParserOptions; |
|
14 | 13 | |
15 | 14 | /** |
16 | 15 | * Class handling the #display_map rendering. |
@@ -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 |