@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * NOTE: This ONLY works for getTitleInfo() and isKnownEmpty(), NOT FOR ANYTHING ELSE. |
138 | 138 | * In particular, it doesn't work for getContent() or getScript() etc. |
139 | 139 | * |
140 | - * @return IDatabase|null |
|
140 | + * @return Database|null |
|
141 | 141 | */ |
142 | 142 | protected function getDB() { |
143 | 143 | return wfGetDB( DB_REPLICA ); |
@@ -277,6 +277,9 @@ discard block |
||
277 | 277 | return count( $revisions ) === 0; |
278 | 278 | } |
279 | 279 | |
280 | + /** |
|
281 | + * @param string $key |
|
282 | + */ |
|
280 | 283 | private function setTitleInfo( $key, array $titleInfo ) { |
281 | 284 | $this->titleInfo[$key] = $titleInfo; |
282 | 285 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | * objects or LinkCache entries. Uses $wgContentHandlerUseDB to determine |
372 | 372 | * whether to include page_content_model. |
373 | 373 | * |
374 | - * @return array |
|
374 | + * @return string[] |
|
375 | 375 | */ |
376 | 376 | protected static function getSelectFields() { |
377 | 377 | global $wgContentHandlerUseDB, $wgPageLanguageUseDB; |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | * Get the prefixed DB key associated with an ID |
567 | 567 | * |
568 | 568 | * @param int $id The page_id of the article |
569 | - * @return Title|null An object representing the article, or null if no such article was found |
|
569 | + * @return null|string An object representing the article, or null if no such article was found |
|
570 | 570 | */ |
571 | 571 | public static function nameOf( $id ) { |
572 | 572 | $dbr = wfGetDB( DB_REPLICA ); |
@@ -1104,7 +1104,6 @@ discard block |
||
1104 | 1104 | /** |
1105 | 1105 | * Returns true if the title is inside one of the specified namespaces. |
1106 | 1106 | * |
1107 | - * @param int|int[] $namespaces,... The namespaces to check for |
|
1108 | 1107 | * @return bool |
1109 | 1108 | * @since 1.19 |
1110 | 1109 | */ |
@@ -1914,7 +1913,7 @@ discard block |
||
1914 | 1913 | * - quick : does cheap permission checks from replica DBs (usable for GUI creation) |
1915 | 1914 | * - full : does cheap and expensive checks possibly from a replica DB |
1916 | 1915 | * - secure : does cheap and expensive checks, using the master as needed |
1917 | - * @param array $ignoreErrors Array of Strings Set this to a list of message keys |
|
1916 | + * @param string[] $ignoreErrors Array of Strings Set this to a list of message keys |
|
1918 | 1917 | * whose corresponding errors may be ignored. |
1919 | 1918 | * @return array Array of arrays of the arguments to wfMessage to explain permissions problems. |
1920 | 1919 | */ |
@@ -2015,7 +2014,7 @@ discard block |
||
2015 | 2014 | * Add the resulting error code to the errors array |
2016 | 2015 | * |
2017 | 2016 | * @param array $errors List of current errors |
2018 | - * @param array $result Result of errors |
|
2017 | + * @param string $result Result of errors |
|
2019 | 2018 | * |
2020 | 2019 | * @return array List of errors |
2021 | 2020 | */ |
@@ -2410,7 +2409,7 @@ discard block |
||
2410 | 2409 | * |
2411 | 2410 | * @param string $action The action to check |
2412 | 2411 | * @param bool $short Short circuit on first error |
2413 | - * @return array List of errors |
|
2412 | + * @return string[] List of errors |
|
2414 | 2413 | */ |
2415 | 2414 | private function missingPermissionError( $action, $short ) { |
2416 | 2415 | // We avoid expensive display logic for quickUserCan's and such |
@@ -3934,7 +3933,7 @@ discard block |
||
3934 | 3933 | * Get an associative array for selecting this title from |
3935 | 3934 | * the "page" table |
3936 | 3935 | * |
3937 | - * @return array Array suitable for the $where parameter of DB::select() |
|
3936 | + * @return IDatabase Array suitable for the $where parameter of DB::select() |
|
3938 | 3937 | */ |
3939 | 3938 | public function pageCond() { |
3940 | 3939 | if ( $this->mArticleID > 0 ) { |
@@ -3950,7 +3949,7 @@ discard block |
||
3950 | 3949 | * |
3951 | 3950 | * @param int $revId Revision ID. Get the revision that was before this one. |
3952 | 3951 | * @param int $flags Title::GAID_FOR_UPDATE |
3953 | - * @return int|bool Old revision ID, or false if none exists |
|
3952 | + * @return integer Old revision ID, or false if none exists |
|
3954 | 3953 | */ |
3955 | 3954 | public function getPreviousRevisionID( $revId, $flags = 0 ) { |
3956 | 3955 | $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_REPLICA ); |
@@ -4090,8 +4089,8 @@ discard block |
||
4090 | 4089 | * Get the number of revisions between the given revision. |
4091 | 4090 | * Used for diffs and other things that really need it. |
4092 | 4091 | * |
4093 | - * @param int|Revision $old Old revision or rev ID (first before range) |
|
4094 | - * @param int|Revision $new New revision or rev ID (first after range) |
|
4092 | + * @param Revision $old Old revision or rev ID (first before range) |
|
4093 | + * @param Revision $new New revision or rev ID (first after range) |
|
4095 | 4094 | * @param int|null $max Limit of Revisions to count, will be incremented to detect truncations |
4096 | 4095 | * @return int Number of revisions between these revisions. |
4097 | 4096 | */ |
@@ -4203,9 +4202,9 @@ discard block |
||
4203 | 4202 | * Used for diffs and other things that really need it. |
4204 | 4203 | * |
4205 | 4204 | * @param int|Revision $old Old revision or rev ID (first before range by default) |
4206 | - * @param int|Revision $new New revision or rev ID (first after range by default) |
|
4205 | + * @param Revision $new New revision or rev ID (first after range by default) |
|
4207 | 4206 | * @param int $limit Maximum number of authors |
4208 | - * @param string|array $options (Optional): Single option, or an array of options: |
|
4207 | + * @param string $options (Optional): Single option, or an array of options: |
|
4209 | 4208 | * 'include_old' Include $old in the range; $new is excluded. |
4210 | 4209 | * 'include_new' Include $new in the range; $old is excluded. |
4211 | 4210 | * 'include_both' Include both $old and $new in the range. |
@@ -4361,7 +4360,7 @@ discard block |
||
4361 | 4360 | /** |
4362 | 4361 | * Get the default message text or false if the message doesn't exist |
4363 | 4362 | * |
4364 | - * @return string|bool |
|
4363 | + * @return false|string |
|
4365 | 4364 | */ |
4366 | 4365 | public function getDefaultMessageText() { |
4367 | 4366 | global $wgContLang; |
@@ -4812,7 +4811,7 @@ discard block |
||
4812 | 4811 | } |
4813 | 4812 | |
4814 | 4813 | /** |
4815 | - * @return array |
|
4814 | + * @return string[] |
|
4816 | 4815 | */ |
4817 | 4816 | public function __sleep() { |
4818 | 4817 | return [ |