@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | * This is for use prior to Setup.php, when no WebRequest object is available. |
| 235 | 235 | * At other times, use the non-static function getProtocol(). |
| 236 | 236 | * |
| 237 | - * @return array |
|
| 237 | + * @return string |
|
| 238 | 238 | */ |
| 239 | 239 | public static function detectProtocol() { |
| 240 | 240 | if ( ( !empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' ) || |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | /** |
| 605 | 605 | * Returns the names of all input values excluding those in $exclude. |
| 606 | 606 | * |
| 607 | - * @param array $exclude |
|
| 607 | + * @param string[] $exclude |
|
| 608 | 608 | * @return array |
| 609 | 609 | */ |
| 610 | 610 | public function getValueNames( $exclude = [] ) { |
@@ -743,7 +743,7 @@ discard block |
||
| 743 | 743 | * @param string $key The name of the cookie |
| 744 | 744 | * @param string $prefix A prefix to use for the cookie name, if not $wgCookiePrefix |
| 745 | 745 | * @param mixed $default What to return if the value isn't found |
| 746 | - * @return mixed Cookie value or $default if the cookie not set |
|
| 746 | + * @return string Cookie value or $default if the cookie not set |
|
| 747 | 747 | */ |
| 748 | 748 | public function getCookie( $key, $prefix = null, $default = null ) { |
| 749 | 749 | if ( $prefix === null ) { |
@@ -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; |
@@ -1144,7 +1144,7 @@ discard block |
||
| 1144 | 1144 | * @param IDatabase $dbw |
| 1145 | 1145 | * @param int|null $pageId Custom page ID that will be used for the insert statement |
| 1146 | 1146 | * |
| 1147 | - * @return bool|int The newly created page_id key; false if the row was not |
|
| 1147 | + * @return integer The newly created page_id key; false if the row was not |
|
| 1148 | 1148 | * inserted, e.g. because the title already existed or because the specified |
| 1149 | 1149 | * page ID is already in use. |
| 1150 | 1150 | */ |
@@ -1491,7 +1491,7 @@ discard block |
||
| 1491 | 1491 | * error will be returned. These two conditions are also possible with |
| 1492 | 1492 | * auto-detection due to MediaWiki's performance-optimised locking strategy. |
| 1493 | 1493 | * |
| 1494 | - * @param bool|int $baseRevId The revision ID this edit was based off, if any. |
|
| 1494 | + * @param boolean $baseRevId The revision ID this edit was based off, if any. |
|
| 1495 | 1495 | * This is not the parent revision ID, rather the revision ID for older |
| 1496 | 1496 | * content used as the source for a rollback, for example. |
| 1497 | 1497 | * @param User $user The user doing the edit |
@@ -3370,7 +3370,7 @@ discard block |
||
| 3370 | 3370 | * Returns a list of categories this page is a member of. |
| 3371 | 3371 | * Results will include hidden categories |
| 3372 | 3372 | * |
| 3373 | - * @return TitleArray |
|
| 3373 | + * @return TitleArrayFromResult|null |
|
| 3374 | 3374 | */ |
| 3375 | 3375 | public function getCategories() { |
| 3376 | 3376 | $id = $this->getId(); |
@@ -3445,7 +3445,7 @@ discard block |
||
| 3445 | 3445 | * Auto-generates a deletion reason |
| 3446 | 3446 | * |
| 3447 | 3447 | * @param bool &$hasHistory Whether the page has a history |
| 3448 | - * @return string|bool String containing deletion reason or empty string, or boolean false |
|
| 3448 | + * @return false|string String containing deletion reason or empty string, or boolean false |
|
| 3449 | 3449 | * if no revision occurred |
| 3450 | 3450 | */ |
| 3451 | 3451 | public function getAutoDeleteReason( &$hasHistory ) { |
@@ -129,6 +129,9 @@ |
||
| 129 | 129 | return 0; |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | + /** |
|
| 133 | + * @param string $tmpDir |
|
| 134 | + */ |
|
| 132 | 135 | private function cleanupTemp( $tmpDir ) { |
| 133 | 136 | if ( file_exists( "$tmpDir/hhvm.hhbc" ) ) { |
| 134 | 137 | unlink( "$tmpDir/hhvm.hhbc" ); |
@@ -81,6 +81,9 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | abstract protected function logAuthResult( $success, $status = null ); |
| 83 | 83 | |
| 84 | + /** |
|
| 85 | + * @param string $name |
|
| 86 | + */ |
|
| 84 | 87 | public function __construct( $name ) { |
| 85 | 88 | global $wgUseMediaWikiUIEverywhere; |
| 86 | 89 | parent::__construct( $name ); |
@@ -365,7 +368,7 @@ discard block |
||
| 365 | 368 | * Show the success page. |
| 366 | 369 | * |
| 367 | 370 | * @param string $type Condition of return to; see `executeReturnTo` |
| 368 | - * @param string|Message $title Page's title |
|
| 371 | + * @param Message $title Page's title |
|
| 369 | 372 | * @param string $msgname |
| 370 | 373 | * @param string $injected_html |
| 371 | 374 | * @param StatusValue|null $extraMessages |
@@ -414,7 +417,6 @@ discard block |
||
| 414 | 417 | /** |
| 415 | 418 | * Replace some globals to make sure the fact that the user has just been logged in is |
| 416 | 419 | * reflected in the current request. |
| 417 | - * @param User $user |
|
| 418 | 420 | */ |
| 419 | 421 | protected function setSessionUserForCurrentRequest() { |
| 420 | 422 | global $wgUser, $wgLang; |
@@ -1254,6 +1256,7 @@ discard block |
||
| 1254 | 1256 | |
| 1255 | 1257 | /** |
| 1256 | 1258 | * @param array $formDescriptor |
| 1259 | + * @param AuthenticationRequest[] $requests |
|
| 1257 | 1260 | */ |
| 1258 | 1261 | protected function postProcessFormDescriptor( &$formDescriptor, $requests ) { |
| 1259 | 1262 | // Pre-fill username (if not creating an account, T46775). |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | * changes. |
| 158 | 158 | * |
| 159 | 159 | * @since 1.28 |
| 160 | - * @param $text |
|
| 160 | + * @param false|string $text |
|
| 161 | 161 | * @return string |
| 162 | 162 | */ |
| 163 | 163 | public static function normalizeLineEndings( $text ) { |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | |
| 296 | 296 | /** |
| 297 | 297 | * @param string $srcPath The source path |
| 298 | - * @return string|bool The real path if it was a virtual URL Returns false on failure |
|
| 298 | + * @return string|false The real path if it was a virtual URL Returns false on failure |
|
| 299 | 299 | */ |
| 300 | 300 | function getRealPath( $srcPath ) { |
| 301 | 301 | $repo = RepoGroup::singleton()->getLocalRepo(); |
@@ -1605,7 +1605,6 @@ discard block |
||
| 1605 | 1605 | * Check a block of CSS or CSS fragment for anything that looks like |
| 1606 | 1606 | * it is bringing in remote code. |
| 1607 | 1607 | * @param string $value a string of CSS |
| 1608 | - * @param bool $propOnly only check css properties (start regex with :) |
|
| 1609 | 1608 | * @return bool true if the CSS contains an illegal string, false if otherwise |
| 1610 | 1609 | */ |
| 1611 | 1610 | private static function checkCssFragment( $value ) { |
@@ -210,7 +210,7 @@ |
||
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | /** |
| 213 | - * @param array $data |
|
| 213 | + * @param string $data |
|
| 214 | 214 | * @return bool|array |
| 215 | 215 | */ |
| 216 | 216 | function getImageInfo( $data ) { |
@@ -207,6 +207,10 @@ discard block |
||
| 207 | 207 | return $result; |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | + /** |
|
| 211 | + * @param string $filter |
|
| 212 | + * @param string $data |
|
| 213 | + */ |
|
| 210 | 214 | private static function applyFilter( $filter, $data ) { |
| 211 | 215 | $data = trim( $data ); |
| 212 | 216 | if ( $data ) { |
@@ -309,7 +313,7 @@ discard block |
||
| 309 | 313 | * @throws MWException If a duplicate module registration is attempted |
| 310 | 314 | * @throws MWException If a module name contains illegal characters (pipes or commas) |
| 311 | 315 | * @throws MWException If something other than a ResourceLoaderModule is being registered |
| 312 | - * @return bool False if there were any errors, in which case one or more modules were |
|
| 316 | + * @return boolean|null False if there were any errors, in which case one or more modules were |
|
| 313 | 317 | * not registered |
| 314 | 318 | */ |
| 315 | 319 | public function register( $name, $info = null ) { |
@@ -573,7 +577,7 @@ discard block |
||
| 573 | 577 | /** |
| 574 | 578 | * Get the list of sources. |
| 575 | 579 | * |
| 576 | - * @return array Like [ id => load.php url, ... ] |
|
| 580 | + * @return string Like [ id => load.php url, ... ] |
|
| 577 | 581 | */ |
| 578 | 582 | public function getSources() { |
| 579 | 583 | return $this->sources; |
@@ -610,7 +614,7 @@ discard block |
||
| 610 | 614 | * |
| 611 | 615 | * @since 1.26 |
| 612 | 616 | * @param ResourceLoaderContext $context |
| 613 | - * @param string[] $modules List of known module names |
|
| 617 | + * @param string[] $moduleNames List of known module names |
|
| 614 | 618 | * @return string Hash |
| 615 | 619 | */ |
| 616 | 620 | public function getCombinedVersion( ResourceLoaderContext $context, array $moduleNames ) { |
@@ -634,7 +638,6 @@ discard block |
||
| 634 | 638 | * |
| 635 | 639 | * @since 1.28 |
| 636 | 640 | * @param ResourceLoaderContext $context |
| 637 | - * @param string[] $modules List of module names |
|
| 638 | 641 | * @return string Hash |
| 639 | 642 | */ |
| 640 | 643 | public function getExpectedVersionQuery( ResourceLoaderContext $context ) { |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | * |
| 297 | 297 | * Omit noarticletext if sharedupload; text will be fetched from the |
| 298 | 298 | * shared upload server if possible. |
| 299 | - * @return string |
|
| 299 | + * @return null|Content |
|
| 300 | 300 | */ |
| 301 | 301 | public function getContentObject() { |
| 302 | 302 | $this->loadFile(); |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | * Make the text under the image to say what size preview |
| 638 | 638 | * |
| 639 | 639 | * @param $params array parameters for thumbnail |
| 640 | - * @param $sizeLinkBigImagePreview HTML for the current size |
|
| 640 | + * @param string $sizeLinkBigImagePreview HTML for the current size |
|
| 641 | 641 | * @return string HTML output |
| 642 | 642 | */ |
| 643 | 643 | private function getThumbPrevText( $params, $sizeLinkBigImagePreview ) { |
@@ -1212,7 +1212,7 @@ discard block |
||
| 1212 | 1212 | |
| 1213 | 1213 | /** |
| 1214 | 1214 | * @see WikiFilePage::getFile |
| 1215 | - * @return bool|File |
|
| 1215 | + * @return string |
|
| 1216 | 1216 | */ |
| 1217 | 1217 | public function getFile() { |
| 1218 | 1218 | return $this->mPage->getFile(); |