@@ -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 |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
| 163 | - * @return bool|int |
|
| 163 | + * @return integer |
|
| 164 | 164 | */ |
| 165 | 165 | public function getNewid() { |
| 166 | 166 | $this->loadRevisionIds(); |
@@ -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' ) ) { |
@@ -675,7 +675,7 @@ discard block |
||
| 675 | 675 | * @param string|bool $ntitle Header for new text or false |
| 676 | 676 | * @param string $notice HTML between diff header and body |
| 677 | 677 | * |
| 678 | - * @return mixed |
|
| 678 | + * @return false|string |
|
| 679 | 679 | */ |
| 680 | 680 | public function getDiff( $otitle, $ntitle, $notice = '' ) { |
| 681 | 681 | $body = $this->getDiffBody(); |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | /** |
| 698 | 698 | * Get the diff table body, without header |
| 699 | 699 | * |
| 700 | - * @return mixed (string/false) |
|
| 700 | + * @return false|string (string/false) |
|
| 701 | 701 | */ |
| 702 | 702 | public function getDiffBody() { |
| 703 | 703 | $this->mCacheHit = true; |
@@ -931,7 +931,7 @@ discard block |
||
| 931 | 931 | * |
| 932 | 932 | * @param string $text |
| 933 | 933 | * |
| 934 | - * @return mixed |
|
| 934 | + * @return string |
|
| 935 | 935 | */ |
| 936 | 936 | public function localiseLineNumbers( $text ) { |
| 937 | 937 | return preg_replace_callback( |
@@ -222,6 +222,13 @@ discard block |
||
| 222 | 222 | return $ranges; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | + /** |
|
| 226 | + * @param integer $bottoml1 |
|
| 227 | + * @param integer $topl1 |
|
| 228 | + * @param integer $bottoml2 |
|
| 229 | + * @param integer $topl2 |
|
| 230 | + * @param integer[] $snake |
|
| 231 | + */ |
|
| 225 | 232 | private function lcs_rec( $bottoml1, $topl1, $bottoml2, $topl2, &$V, &$snake ) { |
| 226 | 233 | // check that both sequences are non-empty |
| 227 | 234 | if ( $bottoml1 > $topl1 || $bottoml2 > $topl2 ) { |
@@ -490,6 +497,11 @@ discard block |
||
| 490 | 497 | */ |
| 491 | 498 | } |
| 492 | 499 | |
| 500 | + /** |
|
| 501 | + * @param double $M |
|
| 502 | + * @param double $N |
|
| 503 | + * @param double $limit |
|
| 504 | + */ |
|
| 493 | 505 | private static function findMostProgress( $M, $N, $limit, $V ) { |
| 494 | 506 | $delta = $N - $M; |
| 495 | 507 | |
@@ -609,6 +621,12 @@ discard block |
||
| 609 | 621 | /** @var int */ |
| 610 | 622 | public $rightlength; |
| 611 | 623 | |
| 624 | + /** |
|
| 625 | + * @param integer $leftstart |
|
| 626 | + * @param integer $leftend |
|
| 627 | + * @param integer $rightstart |
|
| 628 | + * @param integer $rightend |
|
| 629 | + */ |
|
| 612 | 630 | function __construct( $leftstart, $leftend, $rightstart, $rightend ) { |
| 613 | 631 | $this->leftstart = $leftstart; |
| 614 | 632 | $this->leftend = $leftend; |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | class BadTitleError extends ErrorPageError { |
| 30 | 30 | /** |
| 31 | - * @param string|Message|MalformedTitleException $msg A message key (default: 'badtitletext'), or |
|
| 31 | + * @param MalformedTitleException $msg A message key (default: 'badtitletext'), or |
|
| 32 | 32 | * a MalformedTitleException to figure out things from |
| 33 | 33 | * @param array $params Parameter to wfMessage() |
| 34 | 34 | */ |
@@ -265,6 +265,10 @@ |
||
| 265 | 265 | header( $header ); |
| 266 | 266 | } |
| 267 | 267 | } |
| 268 | + |
|
| 269 | + /** |
|
| 270 | + * @param integer $code |
|
| 271 | + */ |
|
| 268 | 272 | private static function statusHeader( $code ) { |
| 269 | 273 | if ( !headers_sent() ) { |
| 270 | 274 | HttpStatus::header( $code ); |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | * } |
| 160 | 160 | * |
| 161 | 161 | * @since 1.25 |
| 162 | - * @param Exception|Throwable $e |
|
| 162 | + * @param Exception $e |
|
| 163 | 163 | */ |
| 164 | 164 | public static function handleException( $e ) { |
| 165 | 165 | try { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * @param array $newname |
|
| 76 | + * @param string $newname |
|
| 77 | 77 | * @return string |
| 78 | 78 | * @throws MWException |
| 79 | 79 | */ |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | - * @return string|null |
|
| 110 | + * @return string |
|
| 111 | 111 | */ |
| 112 | 112 | function getFilenames() { |
| 113 | 113 | return $this->filename; |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | /** |
| 77 | 77 | * Override to write to a different stream type. |
| 78 | 78 | * @param string $string |
| 79 | - * @return bool |
|
| 79 | + * @return boolean|null |
|
| 80 | 80 | */ |
| 81 | 81 | function write( $string ) { |
| 82 | 82 | print $string; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * and reopen new file with the old name. Use this |
| 88 | 88 | * for writing out a file in multiple pieces |
| 89 | 89 | * at specified checkpoints (e.g. every n hours). |
| 90 | - * @param string|array $newname File name. May be a string or an array with one element |
|
| 90 | + * @param string $newname File name. May be a string or an array with one element |
|
| 91 | 91 | */ |
| 92 | 92 | function closeRenameAndReopen( $newname ) { |
| 93 | 93 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * Close the old file, and move it to a specified name. |
| 97 | 97 | * Use this for the last piece of a file written out |
| 98 | 98 | * at specified checkpoints (e.g. every n hours). |
| 99 | - * @param string|array $newname File name. May be a string or an array with one element |
|
| 99 | + * @param string $newname File name. May be a string or an array with one element |
|
| 100 | 100 | * @param bool $open If true, a new file with the old filename will be opened |
| 101 | 101 | * again for writing (default: false) |
| 102 | 102 | */ |
@@ -210,7 +210,7 @@ |
||
| 210 | 210 | * Not called by default (depends on $this->list_authors) |
| 211 | 211 | * Can be set by Special:Export when not exporting whole history |
| 212 | 212 | * |
| 213 | - * @param array $cond |
|
| 213 | + * @param string $cond |
|
| 214 | 214 | */ |
| 215 | 215 | protected function do_list_authors( $cond ) { |
| 216 | 216 | $this->author_list = "<contributors>"; |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | /** |
| 193 | 193 | * Get an explanatory message if this backend is read-only |
| 194 | 194 | * |
| 195 | - * @return string|bool Returns false if the backend is not read-only |
|
| 195 | + * @return string|false Returns false if the backend is not read-only |
|
| 196 | 196 | */ |
| 197 | 197 | final public function getReadOnlyReason() { |
| 198 | 198 | return ( $this->readOnly != '' ) ? $this->readOnly : false; |
@@ -1392,7 +1392,7 @@ discard block |
||
| 1392 | 1392 | * "mwstore://backend/container/...", or null if there is no parent. |
| 1393 | 1393 | * |
| 1394 | 1394 | * @param string $storagePath |
| 1395 | - * @return string|null |
|
| 1395 | + * @return string |
|
| 1396 | 1396 | */ |
| 1397 | 1397 | final public static function parentStoragePath( $storagePath ) { |
| 1398 | 1398 | $storagePath = dirname( $storagePath ); |