@@ -30,7 +30,7 @@ |
||
30 | 30 | /** |
31 | 31 | * @since 2.5 |
32 | 32 | * |
33 | - * @param LanguageJsonFileContentsReader $LanguageJsonFileContentsReader |
|
33 | + * @param LanguageJsonFileContentsReader $languageJsonFileContentsReader |
|
34 | 34 | */ |
35 | 35 | public function __construct( LanguageJsonFileContentsReader $languageJsonFileContentsReader ) { |
36 | 36 | $this->languageJsonFileContentsReader = $languageJsonFileContentsReader; |
@@ -100,7 +100,6 @@ discard block |
||
100 | 100 | * @since 2.5 |
101 | 101 | * |
102 | 102 | * @param string $languageCode |
103 | - * @param boolean $readFromFile |
|
104 | 103 | * |
105 | 104 | * @return boolean |
106 | 105 | */ |
@@ -163,6 +162,10 @@ discard block |
||
163 | 162 | return self::$contents[$languageCode]; |
164 | 163 | } |
165 | 164 | |
165 | + /** |
|
166 | + * @param string $languageCode |
|
167 | + * @param string $cacheKey |
|
168 | + */ |
|
166 | 169 | protected function doReadJsonContentsFromFileBy( $languageCode, $cacheKey ) { |
167 | 170 | |
168 | 171 | $contents = json_decode( |
@@ -189,6 +192,9 @@ discard block |
||
189 | 192 | throw new RuntimeException( "Expected a {$file} file" ); |
190 | 193 | } |
191 | 194 | |
195 | + /** |
|
196 | + * @param string $languageCode |
|
197 | + */ |
|
192 | 198 | private function getCacheKeyFrom( $languageCode ) { |
193 | 199 | return $this->cachePrefix . ':' . $languageCode . ':' . md5( $this->ttl . $this->getModificationTimeByLanguageCode( $languageCode ) ); |
194 | 200 | } |
@@ -402,6 +402,10 @@ |
||
402 | 402 | ) . $suffix ); |
403 | 403 | } |
404 | 404 | |
405 | + /** |
|
406 | + * @param string $id |
|
407 | + * @param DIWikiPage $subject |
|
408 | + */ |
|
405 | 409 | private function appendToList( $id, $subject ) { |
406 | 410 | |
407 | 411 | // Store the id with the main subject |
@@ -232,6 +232,9 @@ |
||
232 | 232 | } |
233 | 233 | } |
234 | 234 | |
235 | + /** |
|
236 | + * @param DIWikiPage|null $subject |
|
237 | + */ |
|
235 | 238 | private function doMatchSubproperty( &$subjects, $subject, DIProperty $property ) { |
236 | 239 | |
237 | 240 | $subproperties = array(); |
@@ -358,7 +358,7 @@ |
||
358 | 358 | /** |
359 | 359 | * @since 2.4 |
360 | 360 | * |
361 | - * @return MediaWikiNsContentReader |
|
361 | + * @return MediaWiki\MediaWikiNsContentReader |
|
362 | 362 | */ |
363 | 363 | public function getMediaWikiNsContentReader() { |
364 | 364 | return $this->callbackLoader->singleton( 'MediaWikiNsContentReader' ); |
@@ -79,7 +79,8 @@ discard block |
||
79 | 79 | /** |
80 | 80 | * @since 2.5 |
81 | 81 | * |
82 | - * @return boolean |
|
82 | + * @param integer $expiryInSeconds |
|
83 | + * @return boolean|null |
|
83 | 84 | */ |
84 | 85 | public function setExpiryInSeconds( $expiryInSeconds ) { |
85 | 86 | $this->expiryInSeconds = $expiryInSeconds; |
@@ -88,7 +89,7 @@ discard block |
||
88 | 89 | /** |
89 | 90 | * @since 2.5 |
90 | 91 | * |
91 | - * @return boolean |
|
92 | + * @return boolean|null |
|
92 | 93 | */ |
93 | 94 | public function isEnabled( $isEnabled ) { |
94 | 95 | $this->isEnabled = $isEnabled; |
@@ -280,6 +281,7 @@ discard block |
||
280 | 281 | /** |
281 | 282 | * Cached content is serialized in an associative array following: |
282 | 283 | * { 'revId' => $revisionId, 'text' => (...) } |
284 | + * @param string $key |
|
283 | 285 | */ |
284 | 286 | private function saveToCache( $key, array $content ) { |
285 | 287 |
@@ -94,6 +94,7 @@ discard block |
||
94 | 94 | * @since 2.1 |
95 | 95 | * |
96 | 96 | * @param boolean |
97 | + * @param boolean $preview |
|
97 | 98 | */ |
98 | 99 | public function useInPreview( $preview ) { |
99 | 100 | $this->useInPreview = $preview; |
@@ -193,7 +194,7 @@ discard block |
||
193 | 194 | * |
194 | 195 | * @since 1.9 |
195 | 196 | * |
196 | - * @return array |
|
197 | + * @return string[] |
|
197 | 198 | */ |
198 | 199 | protected function getModules() { |
199 | 200 | return array( |
@@ -211,7 +212,8 @@ discard block |
||
211 | 212 | * |
212 | 213 | * @since 1.9 |
213 | 214 | * |
214 | - * @return integer $showFactbox |
|
215 | + * @param string|null $showFactbox |
|
216 | + * @return string|null $showFactbox |
|
215 | 217 | * |
216 | 218 | * @return string|null |
217 | 219 | */ |
@@ -397,6 +399,9 @@ discard block |
||
397 | 399 | } |
398 | 400 | } |
399 | 401 | |
402 | + /** |
|
403 | + * @param \SMWDataValue $dataValue |
|
404 | + */ |
|
400 | 405 | private function getInfolink( $dataValue ) { |
401 | 406 | |
402 | 407 | if ( $dataValue->getProperty()->getKey() !== '_SOBJ' ) { |
@@ -119,6 +119,10 @@ discard block |
||
119 | 119 | $this->setNearbySearch(); |
120 | 120 | } |
121 | 121 | |
122 | + /** |
|
123 | + * @param string $value |
|
124 | + * @param boolean $escaped |
|
125 | + */ |
|
122 | 126 | private function getValue( $value, $escaped ) { |
123 | 127 | |
124 | 128 | $this->value = DataValueFactory::getInstance()->newDataValueByProperty( |
@@ -131,6 +135,9 @@ discard block |
||
131 | 135 | return $this->value->isValid() ? $this->value->getWikiValue() : $value; |
132 | 136 | } |
133 | 137 | |
138 | + /** |
|
139 | + * @return string |
|
140 | + */ |
|
134 | 141 | private function unescape( $value, $escaped ) { |
135 | 142 | |
136 | 143 | if ( $this->value instanceof NumberValue ) { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | * @param integer $mode a constant defining what to printout |
70 | 70 | * @param string $label the string label to describe this printout |
71 | 71 | * @param mixed $data optional data for specifying some request, might be a property object, title, or something else; interpretation depends on $mode |
72 | - * @param mixed $outputformat optional string for specifying an output format, e.g. an output unit |
|
72 | + * @param string $outputformat optional string for specifying an output format, e.g. an output unit |
|
73 | 73 | * @param array|null $params optional array of further, named parameters for the print request |
74 | 74 | */ |
75 | 75 | public function __construct( $mode, $label, $data = null, $outputformat = false, array $params = null ) { |
@@ -137,6 +137,7 @@ discard block |
||
137 | 137 | |
138 | 138 | /** |
139 | 139 | * Convenience method for accessing the text in either HTML or Wiki format. |
140 | + * @param integer $outputMode |
|
140 | 141 | */ |
141 | 142 | public function getText( $outputMode, $linker = null ) { |
142 | 143 | return Formatter::format( $this, $linker, $outputMode ); |
@@ -239,7 +240,7 @@ discard block |
||
239 | 240 | /** |
240 | 241 | * Sets a print request parameter. |
241 | 242 | * |
242 | - * @param $key string Name of the parameter |
|
243 | + * @param string $key string Name of the parameter |
|
243 | 244 | * @param $value string Value for the parameter |
244 | 245 | */ |
245 | 246 | public function setParameter( $key, $value ) { |