@@ -578,7 +578,7 @@ discard block |
||
| 578 | 578 | * fake password in which case leave it as it is. |
| 579 | 579 | * |
| 580 | 580 | * @param string $name |
| 581 | - * @param mixed $value |
|
| 581 | + * @param string $value |
|
| 582 | 582 | */ |
| 583 | 583 | public function setPassword( $name, $value ) { |
| 584 | 584 | if ( !preg_match( '/^\*+$/', $value ) ) { |
@@ -1266,7 +1266,7 @@ discard block |
||
| 1266 | 1266 | * |
| 1267 | 1267 | * If $versionInfo is not false, only executables with a version |
| 1268 | 1268 | * matching $versionInfo[1] will be returned. |
| 1269 | - * @return bool|string |
|
| 1269 | + * @return string|false |
|
| 1270 | 1270 | */ |
| 1271 | 1271 | public static function locateExecutable( $path, $names, $versionInfo = false ) { |
| 1272 | 1272 | if ( !is_array( $names ) ) { |
@@ -1298,14 +1298,14 @@ discard block |
||
| 1298 | 1298 | /** |
| 1299 | 1299 | * Same as locateExecutable(), but checks in getPossibleBinPaths() by default |
| 1300 | 1300 | * @see locateExecutable() |
| 1301 | - * @param array $names Array of possible names. |
|
| 1302 | - * @param array|bool $versionInfo Default: false or array with two members: |
|
| 1301 | + * @param string[] $names Array of possible names. |
|
| 1302 | + * @param string[] $versionInfo Default: false or array with two members: |
|
| 1303 | 1303 | * 0 => Command to run for version check, with $1 for the full executable name |
| 1304 | 1304 | * 1 => String to compare the output with |
| 1305 | 1305 | * |
| 1306 | 1306 | * If $versionInfo is not false, only executables with a version |
| 1307 | 1307 | * matching $versionInfo[1] will be returned. |
| 1308 | - * @return bool|string |
|
| 1308 | + * @return string|false |
|
| 1309 | 1309 | */ |
| 1310 | 1310 | public static function locateExecutableInDefaultPaths( $names, $versionInfo = false ) { |
| 1311 | 1311 | foreach ( self::getPossibleBinPaths() as $path ) { |
@@ -1324,7 +1324,7 @@ discard block |
||
| 1324 | 1324 | * Used only by environment checks. |
| 1325 | 1325 | * @param string $dir |
| 1326 | 1326 | * @param string $url |
| 1327 | - * @return bool|int|string |
|
| 1327 | + * @return string|false |
|
| 1328 | 1328 | */ |
| 1329 | 1329 | public function dirIsExecutable( $dir, $url ) { |
| 1330 | 1330 | $scriptTypes = array( |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | } |
| 652 | 652 | |
| 653 | 653 | /** |
| 654 | - * @return bool|string |
|
| 654 | + * @return string|false |
|
| 655 | 655 | */ |
| 656 | 656 | protected function restoreErrorHandler() { |
| 657 | 657 | restore_error_handler(); |
@@ -1103,7 +1103,7 @@ discard block |
||
| 1103 | 1103 | * |
| 1104 | 1104 | * @param array $options Associative array of options to be turned into |
| 1105 | 1105 | * an SQL query, valid keys are listed in the function. |
| 1106 | - * @return array |
|
| 1106 | + * @return string[] |
|
| 1107 | 1107 | * @see DatabaseBase::select() |
| 1108 | 1108 | */ |
| 1109 | 1109 | public function makeSelectOptions( $options ) { |
@@ -2959,8 +2959,8 @@ discard block |
||
| 2959 | 2959 | * on object's error ignore settings). |
| 2960 | 2960 | * |
| 2961 | 2961 | * @param string $filename File name to open |
| 2962 | - * @param bool|callable $lineCallback Optional function called before reading each line |
|
| 2963 | - * @param bool|callable $resultCallback Optional function called for each MySQL result |
|
| 2962 | + * @param boolean $lineCallback Optional function called before reading each line |
|
| 2963 | + * @param boolean $resultCallback Optional function called for each MySQL result |
|
| 2964 | 2964 | * @param bool|string $fname Calling function name or false if name should be |
| 2965 | 2965 | * generated dynamically using $filename |
| 2966 | 2966 | * @param bool|callable $inputCallback Optional function called for each |
@@ -3291,7 +3291,7 @@ discard block |
||
| 3291 | 3291 | } |
| 3292 | 3292 | |
| 3293 | 3293 | /** |
| 3294 | - * @return string|bool Reason this DB is read-only or false if it is not |
|
| 3294 | + * @return string|false Reason this DB is read-only or false if it is not |
|
| 3295 | 3295 | */ |
| 3296 | 3296 | protected function getReadOnlyReason() { |
| 3297 | 3297 | $reason = $this->getLBInfo( 'readOnlyReason' ); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * Constructor |
| 105 | 105 | * @param IContextSource $context Context to use, anything else will be ignored |
| 106 | 106 | * @param int $old Old ID we want to show and diff with. |
| 107 | - * @param string|int $new Either revision ID or 'prev' or 'next'. Default: 0. |
|
| 107 | + * @param integer $new Either revision ID or 'prev' or 'next'. Default: 0. |
|
| 108 | 108 | * @param int $rcid Deprecated, no longer used! |
| 109 | 109 | * @param bool $refreshCache If set, refreshes the diff cache |
| 110 | 110 | * @param bool $unhide If set, allow viewing deleted revs |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * |
| 175 | 175 | * @param int $id Revision ID |
| 176 | 176 | * |
| 177 | - * @return mixed URL or false |
|
| 177 | + * @return string|false URL or false |
|
| 178 | 178 | */ |
| 179 | 179 | public function deletedLink( $id ) { |
| 180 | 180 | if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) { |
@@ -676,7 +676,7 @@ discard block |
||
| 676 | 676 | * @param string|bool $ntitle Header for new text or false |
| 677 | 677 | * @param string $notice HTML between diff header and body |
| 678 | 678 | * |
| 679 | - * @return mixed |
|
| 679 | + * @return false|string |
|
| 680 | 680 | */ |
| 681 | 681 | public function getDiff( $otitle, $ntitle, $notice = '' ) { |
| 682 | 682 | $body = $this->getDiffBody(); |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | /** |
| 699 | 699 | * Get the diff table body, without header |
| 700 | 700 | * |
| 701 | - * @return mixed (string/false) |
|
| 701 | + * @return false|string (string/false) |
|
| 702 | 702 | */ |
| 703 | 703 | public function getDiffBody() { |
| 704 | 704 | $this->mCacheHit = true; |
@@ -973,7 +973,7 @@ discard block |
||
| 973 | 973 | * |
| 974 | 974 | * @param string $text |
| 975 | 975 | * |
| 976 | - * @return mixed |
|
| 976 | + * @return string |
|
| 977 | 977 | */ |
| 978 | 978 | public function localiseLineNumbers( $text ) { |
| 979 | 979 | return preg_replace_callback( |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | /** |
| 193 | 193 | * Fields in the image table |
| 194 | - * @return array |
|
| 194 | + * @return string[] |
|
| 195 | 195 | */ |
| 196 | 196 | static function selectFields() { |
| 197 | 197 | return [ |
@@ -1114,11 +1114,11 @@ discard block |
||
| 1114 | 1114 | |
| 1115 | 1115 | /** |
| 1116 | 1116 | * Upload a file and record it in the DB |
| 1117 | - * @param string|FSFile $src Source storage path, virtual URL, or filesystem path |
|
| 1117 | + * @param string $src Source storage path, virtual URL, or filesystem path |
|
| 1118 | 1118 | * @param string $comment Upload description |
| 1119 | 1119 | * @param string $pageText Text to use for the new description page, |
| 1120 | 1120 | * if a new description page is created |
| 1121 | - * @param int|bool $flags Flags for publish() |
|
| 1121 | + * @param integer $flags Flags for publish() |
|
| 1122 | 1122 | * @param array|bool $props File properties, if known. This can be used to |
| 1123 | 1123 | * reduce the upload time when uploading virtual URLs for which the file |
| 1124 | 1124 | * info is already known |
@@ -1815,7 +1815,7 @@ discard block |
||
| 1815 | 1815 | * it skips the parser cache. |
| 1816 | 1816 | * |
| 1817 | 1817 | * @param Language $lang What language to get description in (Optional) |
| 1818 | - * @return bool|mixed |
|
| 1818 | + * @return false|string |
|
| 1819 | 1819 | */ |
| 1820 | 1820 | function getDescriptionText( $lang = null ) { |
| 1821 | 1821 | $revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL ); |
@@ -1859,7 +1859,7 @@ discard block |
||
| 1859 | 1859 | } |
| 1860 | 1860 | |
| 1861 | 1861 | /** |
| 1862 | - * @return bool|string |
|
| 1862 | + * @return string|false |
|
| 1863 | 1863 | */ |
| 1864 | 1864 | public function getDescriptionTouched() { |
| 1865 | 1865 | // The DB lookup might return false, e.g. if the file was just deleted, or the shared DB repo |
@@ -318,6 +318,9 @@ discard block |
||
| 318 | 318 | return true; |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | + /** |
|
| 322 | + * @param HTMLFormField[] $alldata |
|
| 323 | + */ |
|
| 321 | 324 | function filter( $value, $alldata ) { |
| 322 | 325 | if ( isset( $this->mFilterCallback ) ) { |
| 323 | 326 | $value = call_user_func( $this->mFilterCallback, $value, $alldata, $this->mParent ); |
@@ -625,6 +628,7 @@ discard block |
||
| 625 | 628 | |
| 626 | 629 | /** |
| 627 | 630 | * Get a FieldLayout (or subclass thereof) to wrap this field in when using OOUI output. |
| 631 | + * @param OOUI\Widget $inputField |
|
| 628 | 632 | * @return OOUI\FieldLayout|OOUI\ActionFieldLayout |
| 629 | 633 | */ |
| 630 | 634 | protected function getFieldLayoutOOUI( $inputField, $config ) { |
@@ -798,7 +802,7 @@ discard block |
||
| 798 | 802 | * @since 1.20 |
| 799 | 803 | * |
| 800 | 804 | * @param string $value The value of the input |
| 801 | - * @return array array( $errors, $errorClass ) |
|
| 805 | + * @return string[] array( $errors, $errorClass ) |
|
| 802 | 806 | */ |
| 803 | 807 | public function getErrorsAndErrorClass( $value ) { |
| 804 | 808 | $errors = $this->validate( $value, $this->mParent->mFieldData ); |
@@ -886,6 +890,9 @@ discard block |
||
| 886 | 890 | return $html; |
| 887 | 891 | } |
| 888 | 892 | |
| 893 | + /** |
|
| 894 | + * @return string |
|
| 895 | + */ |
|
| 889 | 896 | function getDefault() { |
| 890 | 897 | if ( isset( $this->mDefault ) ) { |
| 891 | 898 | return $this->mDefault; |
@@ -1059,7 +1066,7 @@ discard block |
||
| 1059 | 1066 | /** |
| 1060 | 1067 | * Formats one or more errors as accepted by field validation-callback. |
| 1061 | 1068 | * |
| 1062 | - * @param string|Message|array $errors Array of strings or Message instances |
|
| 1069 | + * @param string $errors Array of strings or Message instances |
|
| 1063 | 1070 | * @return string HTML |
| 1064 | 1071 | * @since 1.18 |
| 1065 | 1072 | */ |
@@ -116,6 +116,9 @@ |
||
| 116 | 116 | wfDebug( "IMPORT: $data\n" ); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | + /** |
|
| 120 | + * @param string $msg |
|
| 121 | + */ |
|
| 119 | 122 | public function notice( $msg /*, $param, ...*/ ) { |
| 120 | 123 | $params = func_get_args(); |
| 121 | 124 | array_shift( $params ); |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * |
| 197 | 197 | * @note This method is currently unused. |
| 198 | 198 | * @param File $image |
| 199 | - * @return string |
|
| 199 | + * @return boolean |
|
| 200 | 200 | */ |
| 201 | 201 | function getMetadataType( $image ) { |
| 202 | 202 | return false; |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | * @param string $ext Extension of original file |
| 309 | 309 | * @param string $mime MIME type of original file |
| 310 | 310 | * @param array $params Handler specific rendering parameters |
| 311 | - * @return array Thumbnail extension and MIME type |
|
| 311 | + * @return string[] Thumbnail extension and MIME type |
|
| 312 | 312 | */ |
| 313 | 313 | function getThumbType( $ext, $mime, $params = null ) { |
| 314 | 314 | $magic = MimeMagic::singleton(); |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | * @param int $boxWidth Width of the thumbnail box. |
| 649 | 649 | * @param int $boxHeight Height of the thumbnail box. |
| 650 | 650 | * @param int $maxHeight Maximum height expected for the thumbnail. |
| 651 | - * @return int |
|
| 651 | + * @return double |
|
| 652 | 652 | */ |
| 653 | 653 | public static function fitBoxWidth( $boxWidth, $boxHeight, $maxHeight ) { |
| 654 | 654 | $idealWidth = $boxWidth * $maxHeight / $boxHeight; |
@@ -979,7 +979,7 @@ discard block |
||
| 979 | 979 | /** |
| 980 | 980 | * Replace the subtitle with $str |
| 981 | 981 | * |
| 982 | - * @param string|Message $str New value of the subtitle. String should be safe HTML. |
|
| 982 | + * @param string $str New value of the subtitle. String should be safe HTML. |
|
| 983 | 983 | */ |
| 984 | 984 | public function setSubtitle( $str ) { |
| 985 | 985 | $this->clearSubtitle(); |
@@ -1597,7 +1597,7 @@ discard block |
||
| 1597 | 1597 | /** |
| 1598 | 1598 | * Set the displayed file version |
| 1599 | 1599 | * |
| 1600 | - * @param File|bool $file |
|
| 1600 | + * @param File $file |
|
| 1601 | 1601 | * @return mixed Previous value |
| 1602 | 1602 | */ |
| 1603 | 1603 | public function setFileVersion( $file ) { |
@@ -1943,7 +1943,7 @@ discard block |
||
| 1943 | 1943 | /** |
| 1944 | 1944 | * Get the list of cookies that will influence on the cache |
| 1945 | 1945 | * |
| 1946 | - * @return array |
|
| 1946 | + * @return string[] |
|
| 1947 | 1947 | */ |
| 1948 | 1948 | function getCacheVaryCookies() { |
| 1949 | 1949 | static $cookies; |
@@ -2322,7 +2322,7 @@ discard block |
||
| 2322 | 2322 | * indexing, clear the current text and redirect, set the page's title |
| 2323 | 2323 | * and optionally an custom HTML title (content of the "<title>" tag). |
| 2324 | 2324 | * |
| 2325 | - * @param string|Message $pageTitle Will be passed directly to setPageTitle() |
|
| 2325 | + * @param Message $pageTitle Will be passed directly to setPageTitle() |
|
| 2326 | 2326 | * @param string|Message $htmlTitle Will be passed directly to setHTMLTitle(); |
| 2327 | 2327 | * optional, if not passed the "<title>" attribute will be |
| 2328 | 2328 | * based on $pageTitle |
@@ -2348,8 +2348,8 @@ discard block |
||
| 2348 | 2348 | * showErrorPage( 'titlemsg', $messageObject ); |
| 2349 | 2349 | * showErrorPage( $titleMessageObject, $messageObject ); |
| 2350 | 2350 | * |
| 2351 | - * @param string|Message $title Message key (string) for page title, or a Message object |
|
| 2352 | - * @param string|Message $msg Message key (string) for page text, or a Message object |
|
| 2351 | + * @param string $title Message key (string) for page title, or a Message object |
|
| 2352 | + * @param string $msg Message key (string) for page text, or a Message object |
|
| 2353 | 2353 | * @param array $params Message parameters; ignored if $msg is a Message object |
| 2354 | 2354 | */ |
| 2355 | 2355 | public function showErrorPage( $title, $msg, $params = [] ) { |
@@ -2545,6 +2545,9 @@ discard block |
||
| 2545 | 2545 | } |
| 2546 | 2546 | } |
| 2547 | 2547 | |
| 2548 | + /** |
|
| 2549 | + * @param string $message |
|
| 2550 | + */ |
|
| 2548 | 2551 | public function showFatalError( $message ) { |
| 2549 | 2552 | $this->prepareErrorPage( $this->msg( 'internalerror' ) ); |
| 2550 | 2553 | |
@@ -2563,6 +2566,9 @@ discard block |
||
| 2563 | 2566 | $this->showFatalError( $this->msg( 'filerenameerror', $old, $new )->text() ); |
| 2564 | 2567 | } |
| 2565 | 2568 | |
| 2569 | + /** |
|
| 2570 | + * @param string $name |
|
| 2571 | + */ |
|
| 2566 | 2572 | public function showFileDeleteError( $name ) { |
| 2567 | 2573 | $this->showFatalError( $this->msg( 'filedeleteerror', $name )->text() ); |
| 2568 | 2574 | } |
@@ -2589,7 +2595,7 @@ discard block |
||
| 2589 | 2595 | * Add a "return to" link pointing to a specified title, |
| 2590 | 2596 | * or the title indicated in the request, or else the main page |
| 2591 | 2597 | * |
| 2592 | - * @param mixed $unused |
|
| 2598 | + * @param null|boolean $unused |
|
| 2593 | 2599 | * @param Title|string $returnto Title or String to return to |
| 2594 | 2600 | * @param string $returntoquery Query string for the return to link |
| 2595 | 2601 | */ |
@@ -3844,7 +3850,7 @@ discard block |
||
| 3844 | 3850 | * Caller is responsible for ensuring the file exists. Emits a PHP warning otherwise. |
| 3845 | 3851 | * |
| 3846 | 3852 | * @since 1.27 |
| 3847 | - * @param string $remotePath URL path prefix that points to $localPath |
|
| 3853 | + * @param string $remotePathPrefix URL path prefix that points to $localPath |
|
| 3848 | 3854 | * @param string $localPath File directory exposed at $remotePath |
| 3849 | 3855 | * @param string $file Path to target file relative to $localPath |
| 3850 | 3856 | * @return string URL |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | * Return the list of revision fields that should be selected to create |
| 258 | 258 | * a new page. |
| 259 | 259 | * |
| 260 | - * @return array |
|
| 260 | + * @return string[] |
|
| 261 | 261 | */ |
| 262 | 262 | public static function selectFields() { |
| 263 | 263 | global $wgContentHandlerUseDB, $wgPageLanguageUseDB; |
@@ -1142,7 +1142,7 @@ discard block |
||
| 1142 | 1142 | * @param IDatabase $dbw |
| 1143 | 1143 | * @param int|null $pageId Custom page ID that will be used for the insert statement |
| 1144 | 1144 | * |
| 1145 | - * @return bool|int The newly created page_id key; false if the title already existed |
|
| 1145 | + * @return integer The newly created page_id key; false if the title already existed |
|
| 1146 | 1146 | */ |
| 1147 | 1147 | public function insertOn( $dbw, $pageId = null ) { |
| 1148 | 1148 | $pageIdForInsert = $pageId ?: $dbw->nextSequenceValue( 'page_page_id_seq' ); |
@@ -1487,7 +1487,7 @@ discard block |
||
| 1487 | 1487 | * error will be returned. These two conditions are also possible with |
| 1488 | 1488 | * auto-detection due to MediaWiki's performance-optimised locking strategy. |
| 1489 | 1489 | * |
| 1490 | - * @param bool|int $baseRevId The revision ID this edit was based off, if any. |
|
| 1490 | + * @param boolean $baseRevId The revision ID this edit was based off, if any. |
|
| 1491 | 1491 | * This is not the parent revision ID, rather the revision ID for older |
| 1492 | 1492 | * content used as the source for a rollback, for example. |
| 1493 | 1493 | * @param User $user The user doing the edit |
@@ -3360,7 +3360,7 @@ discard block |
||
| 3360 | 3360 | * Returns a list of categories this page is a member of. |
| 3361 | 3361 | * Results will include hidden categories |
| 3362 | 3362 | * |
| 3363 | - * @return TitleArray |
|
| 3363 | + * @return TitleArrayFromResult|null |
|
| 3364 | 3364 | */ |
| 3365 | 3365 | public function getCategories() { |
| 3366 | 3366 | $id = $this->getId(); |
@@ -3435,7 +3435,7 @@ discard block |
||
| 3435 | 3435 | * Auto-generates a deletion reason |
| 3436 | 3436 | * |
| 3437 | 3437 | * @param bool &$hasHistory Whether the page has a history |
| 3438 | - * @return string|bool String containing deletion reason or empty string, or boolean false |
|
| 3438 | + * @return false|string String containing deletion reason or empty string, or boolean false |
|
| 3439 | 3439 | * if no revision occurred |
| 3440 | 3440 | */ |
| 3441 | 3441 | public function getAutoDeleteReason( &$hasHistory ) { |