@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | * Get all styles for a given context. |
382 | 382 | * |
383 | 383 | * @param ResourceLoaderContext $context |
384 | - * @return array CSS code for $context as an associative array mapping media type to CSS text. |
|
384 | + * @return string CSS code for $context as an associative array mapping media type to CSS text. |
|
385 | 385 | */ |
386 | 386 | public function getStyles( ResourceLoaderContext $context ) { |
387 | 387 | $styles = $this->readStyleFiles( |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | * @param array $list List of file paths in any combination of index/path |
632 | 632 | * or path/options pairs |
633 | 633 | * @param string $option Option name |
634 | - * @param mixed $default Default value if the option isn't set |
|
634 | + * @param string $default Default value if the option isn't set |
|
635 | 635 | * @return array List of file paths, collated by $option |
636 | 636 | */ |
637 | 637 | protected static function collateFilePathListByOption( array $list, $option, $default ) { |
@@ -1007,6 +1007,7 @@ discard block |
||
1007 | 1007 | * the BOM character is not valid in the middle of a string. |
1008 | 1008 | * We already assume UTF-8 everywhere, so this should be safe. |
1009 | 1009 | * |
1010 | + * @param string $input |
|
1010 | 1011 | * @return string input minus the intial BOM char |
1011 | 1012 | */ |
1012 | 1013 | protected function stripBom( $input ) { |
@@ -163,6 +163,9 @@ |
||
163 | 163 | } ); |
164 | 164 | } |
165 | 165 | |
166 | + /** |
|
167 | + * @param string $table |
|
168 | + */ |
|
166 | 169 | private function batchDeleteByPK( $table, array $conds, array $pk, $bSize ) { |
167 | 170 | $dbw = $this->mDb; // convenience |
168 | 171 | $res = $dbw->select( $table, $pk, $conds, __METHOD__ ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * Log CSP report, with a different severity depending on $flags |
66 | 66 | * @param $flags Array Flags for this report |
67 | - * @param $logLine String text of log entry |
|
67 | + * @param string $logLine String text of log entry |
|
68 | 68 | * @param $context Array logging context |
69 | 69 | */ |
70 | 70 | private function logReport( $flags, $logLine, $context ) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * Stop processing the request, and output/log an error |
166 | 166 | * |
167 | 167 | * @param $code String error code |
168 | - * @param $method String method that made error |
|
168 | + * @param string $method String method that made error |
|
169 | 169 | * @throws UsageException Always |
170 | 170 | */ |
171 | 171 | private function error( $code, $method ) { |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * @param RecentChange|RCCacheEntry $rc |
154 | 154 | * @param string|bool $watched Optionally timestamp for adding watched class |
155 | 155 | * |
156 | - * @return array of classes |
|
156 | + * @return string[] of classes |
|
157 | 157 | */ |
158 | 158 | protected function getHTMLClasses( $rc, $watched ) { |
159 | 159 | $classes = []; |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | |
230 | 230 | /** |
231 | - * @param ResultWrapper|array $rows |
|
231 | + * @param ResultWrapper $rows |
|
232 | 232 | */ |
233 | 233 | public function initChangesListRows( $rows ) { |
234 | 234 | Hooks::run( 'ChangesListInitRows', [ $this, $rows ] ); |
@@ -478,6 +478,8 @@ discard block |
||
478 | 478 | * |
479 | 479 | * @param string &$s HTML to update |
480 | 480 | * @param RecentChange &$rc |
481 | + * @param string $s |
|
482 | + * @param RecentChange $rc |
|
481 | 483 | */ |
482 | 484 | public function insertUserRelatedLinks( &$s, &$rc ) { |
483 | 485 | if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) { |
@@ -636,7 +638,7 @@ discard block |
||
636 | 638 | |
637 | 639 | /** |
638 | 640 | * @param RecentChange $rc |
639 | - * @param array $classes |
|
641 | + * @param string[] $classes |
|
640 | 642 | * @return string |
641 | 643 | * @since 1.26 |
642 | 644 | */ |
@@ -646,6 +648,10 @@ discard block |
||
646 | 648 | return $s; |
647 | 649 | } |
648 | 650 | |
651 | + /** |
|
652 | + * @param string $s |
|
653 | + * @param RecentChange $rc |
|
654 | + */ |
|
649 | 655 | public function insertExtra( &$s, &$rc, &$classes ) { |
650 | 656 | // Empty, used for subclasses to add anything special. |
651 | 657 | } |
@@ -85,7 +85,7 @@ |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * @return array |
|
88 | + * @return string[] |
|
89 | 89 | */ |
90 | 90 | function getOrderFields() { |
91 | 91 | return array( 'rd_namespace', 'rd_title', 'rd_from' ); |
@@ -1206,7 +1206,7 @@ discard block |
||
1206 | 1206 | * @since 1.27 |
1207 | 1207 | * |
1208 | 1208 | * @param string $referenceString Space delimited list of ids |
1209 | - * @param string|array $options String or array of strings (default is array()): |
|
1209 | + * @param string $options String or array of strings (default is array()): |
|
1210 | 1210 | * 'noninitial': This is a non-initial fragment of an id, not a full id, |
1211 | 1211 | * so don't pay attention if the first character isn't valid at the |
1212 | 1212 | * beginning of an id. Only matters if $wgExperimentalHtmlIds is |
@@ -1334,7 +1334,7 @@ discard block |
||
1334 | 1334 | * Pick the appropriate attribute value from a match set from the |
1335 | 1335 | * attribs regex matches. |
1336 | 1336 | * |
1337 | - * @param array $set |
|
1337 | + * @param string[] $set |
|
1338 | 1338 | * @throws MWException When tag conditions are not met. |
1339 | 1339 | * @return string |
1340 | 1340 | */ |
@@ -1850,7 +1850,7 @@ discard block |
||
1850 | 1850 | |
1851 | 1851 | /** |
1852 | 1852 | * @param string $url |
1853 | - * @return mixed|string |
|
1853 | + * @return string |
|
1854 | 1854 | */ |
1855 | 1855 | static function cleanUrl( $url ) { |
1856 | 1856 | # Normalize any HTML entities in input. They will be |
@@ -1936,7 +1936,7 @@ discard block |
||
1936 | 1936 | * @since 1.18 |
1937 | 1937 | * |
1938 | 1938 | * @param string $addr E-mail address |
1939 | - * @return bool |
|
1939 | + * @return null|boolean |
|
1940 | 1940 | */ |
1941 | 1941 | public static function validateEmail( $addr ) { |
1942 | 1942 | $result = null; |
@@ -100,7 +100,7 @@ |
||
100 | 100 | |
101 | 101 | /** |
102 | 102 | * Fetch the rights allowed by a set of grants. |
103 | - * @param string[]|string $grants |
|
103 | + * @param string[] $grants |
|
104 | 104 | * @return string[] |
105 | 105 | */ |
106 | 106 | public static function getGrantRights( $grants ) { |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | /** |
186 | 186 | * Return the list of ipblocks fields that should be selected to create |
187 | 187 | * a new block. |
188 | - * @return array |
|
188 | + * @return string[] |
|
189 | 189 | */ |
190 | 190 | public static function selectFields() { |
191 | 191 | return [ |
@@ -1004,7 +1004,7 @@ discard block |
||
1004 | 1004 | /** |
1005 | 1005 | * Get a timestamp of the expiry for autoblocks |
1006 | 1006 | * |
1007 | - * @param string|int $timestamp |
|
1007 | + * @param string|false $timestamp |
|
1008 | 1008 | * @return string |
1009 | 1009 | */ |
1010 | 1010 | public static function getAutoblockExpiry( $timestamp ) { |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | /** |
1362 | 1362 | * @since 1.19 |
1363 | 1363 | * |
1364 | - * @return mixed|string |
|
1364 | + * @return string |
|
1365 | 1365 | */ |
1366 | 1366 | public function getExpiry() { |
1367 | 1367 | return $this->mExpiry; |
@@ -205,42 +205,42 @@ discard block |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
208 | - * @return mixed DB key name, or false on failure |
|
208 | + * @return boolean DB key name, or false on failure |
|
209 | 209 | */ |
210 | 210 | public function getName() { |
211 | 211 | return $this->getX( 'mName' ); |
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
215 | - * @return mixed Category ID, or false on failure |
|
215 | + * @return boolean Category ID, or false on failure |
|
216 | 216 | */ |
217 | 217 | public function getID() { |
218 | 218 | return $this->getX( 'mID' ); |
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
222 | - * @return mixed Total number of member pages, or false on failure |
|
222 | + * @return boolean Total number of member pages, or false on failure |
|
223 | 223 | */ |
224 | 224 | public function getPageCount() { |
225 | 225 | return $this->getX( 'mPages' ); |
226 | 226 | } |
227 | 227 | |
228 | 228 | /** |
229 | - * @return mixed Number of subcategories, or false on failure |
|
229 | + * @return boolean Number of subcategories, or false on failure |
|
230 | 230 | */ |
231 | 231 | public function getSubcatCount() { |
232 | 232 | return $this->getX( 'mSubcats' ); |
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
236 | - * @return mixed Number of member files, or false on failure |
|
236 | + * @return boolean Number of member files, or false on failure |
|
237 | 237 | */ |
238 | 238 | public function getFileCount() { |
239 | 239 | return $this->getX( 'mFiles' ); |
240 | 240 | } |
241 | 241 | |
242 | 242 | /** |
243 | - * @return Title|bool Title for this category, or false on failure. |
|
243 | + * @return Title Title for this category, or false on failure. |
|
244 | 244 | */ |
245 | 245 | public function getTitle() { |
246 | 246 | if ( $this->mTitle ) { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | * category sort key $offset. |
261 | 261 | * @param int $limit |
262 | 262 | * @param string $offset |
263 | - * @return TitleArray TitleArray object for category members. |
|
263 | + * @return TitleArrayFromResult|null TitleArray object for category members. |
|
264 | 264 | */ |
265 | 265 | public function getMembers( $limit = false, $offset = '' ) { |
266 | 266 |