@@ -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' ); |
@@ -423,7 +423,7 @@ |
||
| 423 | 423 | * Returns a sentence describing the log action. Usually |
| 424 | 424 | * a Message object is returned, but old style log types |
| 425 | 425 | * and entries might return pre-escaped HTML string. |
| 426 | - * @return Message|string Pre-escaped HTML |
|
| 426 | + * @return string Pre-escaped HTML |
|
| 427 | 427 | */ |
| 428 | 428 | protected function getActionMessage() { |
| 429 | 429 | $message = $this->msg( $this->getMessageKey() ); |
@@ -371,6 +371,9 @@ |
||
| 371 | 371 | return 'djvuxml'; |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | + /** |
|
| 375 | + * @param File $image |
|
| 376 | + */ |
|
| 374 | 377 | function isMetadataValid( $image, $metadata ) { |
| 375 | 378 | return !empty( $metadata ) && $metadata != serialize( [] ); |
| 376 | 379 | } |
@@ -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; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | /** |
| 81 | 81 | * Get the final extension of the thumbnail. |
| 82 | 82 | * Returns false for scripted transformations. |
| 83 | - * @return string|bool |
|
| 83 | + * @return string|false |
|
| 84 | 84 | */ |
| 85 | 85 | public function getExtension() { |
| 86 | 86 | return $this->path ? FileBackend::extensionFromPath( $this->path ) : false; |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | * |
| 215 | 215 | * @deprecated since 1.26, use streamFileWithStatus |
| 216 | 216 | * @param array $headers Additional HTTP headers to send on success |
| 217 | - * @return bool Success |
|
| 217 | + * @return boolean|null Success |
|
| 218 | 218 | */ |
| 219 | 219 | public function streamFile( $headers = [] ) { |
| 220 | 220 | $this->streamFileWithStatus( $headers )->isOK(); |
@@ -445,6 +445,9 @@ discard block |
||
| 445 | 445 | /** @var string Plain text formatted version of the error */ |
| 446 | 446 | private $textMsg; |
| 447 | 447 | |
| 448 | + /** |
|
| 449 | + * @param string $msg |
|
| 450 | + */ |
|
| 448 | 451 | function __construct( $msg, $width, $height /*, ... */ ) { |
| 449 | 452 | $args = array_slice( func_get_args(), 3 ); |
| 450 | 453 | $htmlArgs = array_map( 'htmlspecialchars', $args ); |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | * @note Code that wants to retrieve page content from the database should |
| 354 | 354 | * use WikiPage::getContent(). |
| 355 | 355 | * |
| 356 | - * @return Content|null|bool |
|
| 356 | + * @return null|Content |
|
| 357 | 357 | * |
| 358 | 358 | * @since 1.21 |
| 359 | 359 | */ |
@@ -1529,7 +1529,7 @@ discard block |
||
| 1529 | 1529 | * Chances are you should just be using the ParserOutput from |
| 1530 | 1530 | * WikitextContent::getParserOutput instead of calling this for redirects. |
| 1531 | 1531 | * |
| 1532 | - * @param Title|array $target Destination(s) to redirect |
|
| 1532 | + * @param Title $target Destination(s) to redirect |
|
| 1533 | 1533 | * @param bool $appendSubtitle [optional] |
| 1534 | 1534 | * @param bool $forceKnown Should the image be shown as a bluelink regardless of existence? |
| 1535 | 1535 | * @return string Containing HTML with redirect link |
@@ -2648,7 +2648,7 @@ discard block |
||
| 2648 | 2648 | * @param string $reason |
| 2649 | 2649 | * @param int $cascade |
| 2650 | 2650 | * @param array $expiry |
| 2651 | - * @return bool |
|
| 2651 | + * @return Status |
|
| 2652 | 2652 | */ |
| 2653 | 2653 | public function updateRestrictions( $limit = [], $reason = '', |
| 2654 | 2654 | &$cascade = 0, $expiry = [] |
@@ -2705,7 +2705,7 @@ discard block |
||
| 2705 | 2705 | |
| 2706 | 2706 | /** |
| 2707 | 2707 | * @param bool $hasHistory |
| 2708 | - * @return mixed |
|
| 2708 | + * @return false|string |
|
| 2709 | 2709 | */ |
| 2710 | 2710 | public function generateReason( &$hasHistory ) { |
| 2711 | 2711 | $title = $this->mPage->getTitle(); |
@@ -2714,7 +2714,7 @@ discard block |
||
| 2714 | 2714 | } |
| 2715 | 2715 | |
| 2716 | 2716 | /** |
| 2717 | - * @return array |
|
| 2717 | + * @return string[] |
|
| 2718 | 2718 | * |
| 2719 | 2719 | * @deprecated since 1.24, use WikiPage::selectFields() instead |
| 2720 | 2720 | */ |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | * @since 1.25 |
| 616 | 616 | * |
| 617 | 617 | * @param string $text Text extension wants to have parsed |
| 618 | - * @param bool|PPFrame $frame The frame to use for expanding any template variables |
|
| 618 | + * @param PPFrame $frame The frame to use for expanding any template variables |
|
| 619 | 619 | * @return string Fully parsed HTML |
| 620 | 620 | */ |
| 621 | 621 | public function recursiveTagParseFully( $text, $frame = false ) { |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | * @param ParserOptions $options |
| 634 | 634 | * @param int|null $revid |
| 635 | 635 | * @param bool|PPFrame $frame |
| 636 | - * @return mixed|string |
|
| 636 | + * @return string |
|
| 637 | 637 | */ |
| 638 | 638 | public function preprocess( $text, Title $title = null, |
| 639 | 639 | ParserOptions $options, $revid = null, $frame = false |
@@ -1969,6 +1969,10 @@ discard block |
||
| 1969 | 1969 | return $ret; |
| 1970 | 1970 | } |
| 1971 | 1971 | |
| 1972 | + /** |
|
| 1973 | + * @param string $component |
|
| 1974 | + * @param string $unsafe |
|
| 1975 | + */ |
|
| 1972 | 1976 | private static function normalizeUrlComponent( $component, $unsafe ) { |
| 1973 | 1977 | $callback = function ( $matches ) use ( $unsafe ) { |
| 1974 | 1978 | $char = urldecode( $matches[0] ); |
@@ -2420,6 +2424,7 @@ discard block |
||
| 2420 | 2424 | * |
| 2421 | 2425 | * @param string $target The source of the link |
| 2422 | 2426 | * @param string &$text The link text, modified as necessary |
| 2427 | + * @param string $text |
|
| 2423 | 2428 | * @return string The full name of the link |
| 2424 | 2429 | * @private |
| 2425 | 2430 | */ |
@@ -2445,7 +2450,7 @@ discard block |
||
| 2445 | 2450 | * @private |
| 2446 | 2451 | * |
| 2447 | 2452 | * @param int $index |
| 2448 | - * @param bool|PPFrame $frame |
|
| 2453 | + * @param PPFrame $frame |
|
| 2449 | 2454 | * |
| 2450 | 2455 | * @throws MWException |
| 2451 | 2456 | * @return string |
@@ -2842,7 +2847,7 @@ discard block |
||
| 2842 | 2847 | * |
| 2843 | 2848 | * @param string $s |
| 2844 | 2849 | * |
| 2845 | - * @return array |
|
| 2850 | + * @return string[] |
|
| 2846 | 2851 | */ |
| 2847 | 2852 | public static function splitWhitespace( $s ) { |
| 2848 | 2853 | $ltrimmed = ltrim( $s ); |
@@ -2950,7 +2955,7 @@ discard block |
||
| 2950 | 2955 | * 'expansion-depth-exceeded' (corresponding messages: |
| 2951 | 2956 | * 'expansion-depth-exceeded-warning', |
| 2952 | 2957 | * 'expansion-depth-exceeded-category') |
| 2953 | - * @param string|int|null $current Current value |
|
| 2958 | + * @param integer $current Current value |
|
| 2954 | 2959 | * @param string|int|null $max Maximum allowed, when an explicit limit has been |
| 2955 | 2960 | * exceeded, provide the values (optional) |
| 2956 | 2961 | */ |
@@ -3954,7 +3959,7 @@ discard block |
||
| 3954 | 3959 | * @param string $text |
| 3955 | 3960 | * @param string $origText Original, untouched wikitext |
| 3956 | 3961 | * @param bool $isMain |
| 3957 | - * @return mixed|string |
|
| 3962 | + * @return string |
|
| 3958 | 3963 | * @private |
| 3959 | 3964 | */ |
| 3960 | 3965 | public function formatHeadings( $text, $origText, $isMain = true ) { |
@@ -4525,7 +4530,7 @@ discard block |
||
| 4525 | 4530 | * Check that the user's signature contains no bad XML |
| 4526 | 4531 | * |
| 4527 | 4532 | * @param string $text |
| 4528 | - * @return string|bool An expanded string, or false if invalid. |
|
| 4533 | + * @return string|false An expanded string, or false if invalid. |
|
| 4529 | 4534 | */ |
| 4530 | 4535 | public function validateSig( $text ) { |
| 4531 | 4536 | return Xml::isWellFormedXmlFragment( $text ) ? $text : false; |
@@ -5067,7 +5072,7 @@ discard block |
||
| 5067 | 5072 | * |
| 5068 | 5073 | * @param Title $title |
| 5069 | 5074 | * @param string $options |
| 5070 | - * @param LinkHolderArray|bool $holders |
|
| 5075 | + * @param LinkHolderArray $holders |
|
| 5071 | 5076 | * @return string HTML |
| 5072 | 5077 | */ |
| 5073 | 5078 | public function makeImage( $title, $options, $holders = false ) { |
@@ -5283,7 +5288,7 @@ discard block |
||
| 5283 | 5288 | /** |
| 5284 | 5289 | * @param string $caption |
| 5285 | 5290 | * @param LinkHolderArray|bool $holders |
| 5286 | - * @return mixed|string |
|
| 5291 | + * @return string |
|
| 5287 | 5292 | */ |
| 5288 | 5293 | protected function stripAltText( $caption, $holders ) { |
| 5289 | 5294 | # Strip bad stuff out of the title (tooltip). We can't just use |
@@ -5686,7 +5691,7 @@ discard block |
||
| 5686 | 5691 | * Accessor for $mDefaultSort |
| 5687 | 5692 | * Unlike getDefaultSort(), will return false if none is set |
| 5688 | 5693 | * |
| 5689 | - * @return string|bool |
|
| 5694 | + * @return false|string |
|
| 5690 | 5695 | */ |
| 5691 | 5696 | public function getCustomDefaultSort() { |
| 5692 | 5697 | return $this->mDefaultSort; |
@@ -1311,7 +1311,6 @@ discard block |
||
| 1311 | 1311 | /** |
| 1312 | 1312 | * @param string $sep |
| 1313 | 1313 | * @param int $flags |
| 1314 | - * @param string|PPNode_DOM|DOMDocument $args,... |
|
| 1315 | 1314 | * @return string |
| 1316 | 1315 | */ |
| 1317 | 1316 | public function implodeWithFlags( $sep, $flags /*, ... */ ) { |
@@ -1343,7 +1342,6 @@ discard block |
||
| 1343 | 1342 | * This previously called implodeWithFlags but has now been inlined to reduce stack depth |
| 1344 | 1343 | * |
| 1345 | 1344 | * @param string $sep |
| 1346 | - * @param string|PPNode_DOM|DOMDocument $args,... |
|
| 1347 | 1345 | * @return string |
| 1348 | 1346 | */ |
| 1349 | 1347 | public function implode( $sep /*, ... */ ) { |
@@ -1375,7 +1373,6 @@ discard block |
||
| 1375 | 1373 | * with implode() |
| 1376 | 1374 | * |
| 1377 | 1375 | * @param string $sep |
| 1378 | - * @param string|PPNode_DOM|DOMDocument $args,... |
|
| 1379 | 1376 | * @return array |
| 1380 | 1377 | */ |
| 1381 | 1378 | public function virtualImplode( $sep /*, ... */ ) { |
@@ -1407,7 +1404,6 @@ discard block |
||
| 1407 | 1404 | * @param string $start |
| 1408 | 1405 | * @param string $sep |
| 1409 | 1406 | * @param string $end |
| 1410 | - * @param string|PPNode_DOM|DOMDocument $args,... |
|
| 1411 | 1407 | * @return array |
| 1412 | 1408 | */ |
| 1413 | 1409 | public function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) { |
@@ -1570,7 +1566,7 @@ discard block |
||
| 1570 | 1566 | |
| 1571 | 1567 | /** |
| 1572 | 1568 | * @param Preprocessor $preprocessor |
| 1573 | - * @param bool|PPFrame_DOM $parent |
|
| 1569 | + * @param PPFrame_DOM $parent |
|
| 1574 | 1570 | * @param array $numberedArgs |
| 1575 | 1571 | * @param array $namedArgs |
| 1576 | 1572 | * @param bool|Title $title |
@@ -1741,6 +1737,9 @@ discard block |
||
| 1741 | 1737 | |
| 1742 | 1738 | public $args; |
| 1743 | 1739 | |
| 1740 | + /** |
|
| 1741 | + * @param Preprocessor_DOM $preprocessor |
|
| 1742 | + */ |
|
| 1744 | 1743 | public function __construct( $preprocessor, $args ) { |
| 1745 | 1744 | parent::__construct( $preprocessor ); |
| 1746 | 1745 | $this->args = $args; |
@@ -688,6 +688,9 @@ discard block |
||
| 688 | 688 | return $rootNode; |
| 689 | 689 | } |
| 690 | 690 | |
| 691 | + /** |
|
| 692 | + * @param string $text |
|
| 693 | + */ |
|
| 691 | 694 | private static function addLiteral( array &$accum, $text ) { |
| 692 | 695 | $n = count( $accum ); |
| 693 | 696 | if ( $n && is_string( $accum[$n - 1] ) ) { |
@@ -1133,7 +1136,6 @@ discard block |
||
| 1133 | 1136 | /** |
| 1134 | 1137 | * @param string $sep |
| 1135 | 1138 | * @param int $flags |
| 1136 | - * @param string|PPNode $args,... |
|
| 1137 | 1139 | * @return string |
| 1138 | 1140 | */ |
| 1139 | 1141 | public function implodeWithFlags( $sep, $flags /*, ... */ ) { |
@@ -1164,7 +1166,6 @@ discard block |
||
| 1164 | 1166 | * Implode with no flags specified |
| 1165 | 1167 | * This previously called implodeWithFlags but has now been inlined to reduce stack depth |
| 1166 | 1168 | * @param string $sep |
| 1167 | - * @param string|PPNode $args,... |
|
| 1168 | 1169 | * @return string |
| 1169 | 1170 | */ |
| 1170 | 1171 | public function implode( $sep /*, ... */ ) { |
@@ -1196,7 +1197,6 @@ discard block |
||
| 1196 | 1197 | * with implode() |
| 1197 | 1198 | * |
| 1198 | 1199 | * @param string $sep |
| 1199 | - * @param string|PPNode $args,... |
|
| 1200 | 1200 | * @return PPNode_Hash_Array |
| 1201 | 1201 | */ |
| 1202 | 1202 | public function virtualImplode( $sep /*, ... */ ) { |
@@ -1229,7 +1229,6 @@ discard block |
||
| 1229 | 1229 | * @param string $start |
| 1230 | 1230 | * @param string $sep |
| 1231 | 1231 | * @param string $end |
| 1232 | - * @param string|PPNode $args,... |
|
| 1233 | 1232 | * @return PPNode_Hash_Array |
| 1234 | 1233 | */ |
| 1235 | 1234 | public function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) { |
@@ -1392,7 +1391,7 @@ discard block |
||
| 1392 | 1391 | |
| 1393 | 1392 | /** |
| 1394 | 1393 | * @param Preprocessor $preprocessor |
| 1395 | - * @param bool|PPFrame $parent |
|
| 1394 | + * @param PPFrame_Hash $parent |
|
| 1396 | 1395 | * @param array $numberedArgs |
| 1397 | 1396 | * @param array $namedArgs |
| 1398 | 1397 | * @param bool|Title $title |
@@ -1572,6 +1571,9 @@ discard block |
||
| 1572 | 1571 | |
| 1573 | 1572 | public $args; |
| 1574 | 1573 | |
| 1574 | + /** |
|
| 1575 | + * @param Preprocessor_Hash $preprocessor |
|
| 1576 | + */ |
|
| 1575 | 1577 | public function __construct( $preprocessor, $args ) { |
| 1576 | 1578 | parent::__construct( $preprocessor ); |
| 1577 | 1579 | $this->args = $args; |