@@ -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; |
@@ -112,6 +112,9 @@ |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
115 | + /** |
|
116 | + * @return string |
|
117 | + */ |
|
115 | 118 | function stripParameters( $text ) { |
116 | 119 | if ( !$this->stripParametersEnabled ) { |
117 | 120 | return $text; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
101 | - * @param string|bool|int $expand A PROTO_* constant or false |
|
101 | + * @param string $expand A PROTO_* constant or false |
|
102 | 102 | */ |
103 | 103 | public function setExpandURLs( $expand ) { |
104 | 104 | $this->expandUrls = $expand; |
@@ -189,6 +189,9 @@ discard block |
||
189 | 189 | return $options; |
190 | 190 | } |
191 | 191 | |
192 | + /** |
|
193 | + * @param boolean $isKnown |
|
194 | + */ |
|
192 | 195 | private function runBeginHook( LinkTarget $target, &$text, &$extraAttribs, &$query, $isKnown ) { |
193 | 196 | $ret = null; |
194 | 197 | if ( !Hooks::run( 'HtmlPageLinkRendererBegin', |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | * Get all styles for a given context. |
382 | 382 | * |
383 | 383 | * @param ResourceLoaderContext $context |
384 | - * @return array CSS code for $context as an associative array mapping media type to CSS text. |
|
384 | + * @return string CSS code for $context as an associative array mapping media type to CSS text. |
|
385 | 385 | */ |
386 | 386 | public function getStyles( ResourceLoaderContext $context ) { |
387 | 387 | $styles = $this->readStyleFiles( |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | * @param array $list List of file paths in any combination of index/path |
632 | 632 | * or path/options pairs |
633 | 633 | * @param string $option Option name |
634 | - * @param mixed $default Default value if the option isn't set |
|
634 | + * @param string $default Default value if the option isn't set |
|
635 | 635 | * @return array List of file paths, collated by $option |
636 | 636 | */ |
637 | 637 | protected static function collateFilePathListByOption( array $list, $option, $default ) { |
@@ -1007,6 +1007,7 @@ discard block |
||
1007 | 1007 | * the BOM character is not valid in the middle of a string. |
1008 | 1008 | * We already assume UTF-8 everywhere, so this should be safe. |
1009 | 1009 | * |
1010 | + * @param string $input |
|
1010 | 1011 | * @return string input minus the intial BOM char |
1011 | 1012 | */ |
1012 | 1013 | protected function stripBom( $input ) { |
@@ -163,6 +163,9 @@ |
||
163 | 163 | } ); |
164 | 164 | } |
165 | 165 | |
166 | + /** |
|
167 | + * @param string $table |
|
168 | + */ |
|
166 | 169 | private function batchDeleteByPK( $table, array $conds, array $pk, $bSize ) { |
167 | 170 | $dbw = $this->mDb; // convenience |
168 | 171 | $res = $dbw->select( $table, $pk, $conds, __METHOD__ ); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | * @param RecentChange|RCCacheEntry $rc |
154 | 154 | * @param string|bool $watched Optionally timestamp for adding watched class |
155 | 155 | * |
156 | - * @return array of classes |
|
156 | + * @return string[] of classes |
|
157 | 157 | */ |
158 | 158 | protected function getHTMLClasses( $rc, $watched ) { |
159 | 159 | $classes = []; |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | } |
229 | 229 | |
230 | 230 | /** |
231 | - * @param ResultWrapper|array $rows |
|
231 | + * @param ResultWrapper $rows |
|
232 | 232 | */ |
233 | 233 | public function initChangesListRows( $rows ) { |
234 | 234 | Hooks::run( 'ChangesListInitRows', [ $this, $rows ] ); |
@@ -478,6 +478,8 @@ discard block |
||
478 | 478 | * |
479 | 479 | * @param string &$s HTML to update |
480 | 480 | * @param RecentChange &$rc |
481 | + * @param string $s |
|
482 | + * @param RecentChange $rc |
|
481 | 483 | */ |
482 | 484 | public function insertUserRelatedLinks( &$s, &$rc ) { |
483 | 485 | if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) { |
@@ -636,7 +638,7 @@ discard block |
||
636 | 638 | |
637 | 639 | /** |
638 | 640 | * @param RecentChange $rc |
639 | - * @param array $classes |
|
641 | + * @param string[] $classes |
|
640 | 642 | * @return string |
641 | 643 | * @since 1.26 |
642 | 644 | */ |
@@ -646,6 +648,10 @@ discard block |
||
646 | 648 | return $s; |
647 | 649 | } |
648 | 650 | |
651 | + /** |
|
652 | + * @param string $s |
|
653 | + * @param RecentChange $rc |
|
654 | + */ |
|
649 | 655 | public function insertExtra( &$s, &$rc, &$classes ) { |
650 | 656 | // Empty, used for subclasses to add anything special. |
651 | 657 | } |
@@ -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' ); |
@@ -1206,7 +1206,7 @@ discard block |
||
1206 | 1206 | * @since 1.27 |
1207 | 1207 | * |
1208 | 1208 | * @param string $referenceString Space delimited list of ids |
1209 | - * @param string|array $options String or array of strings (default is array()): |
|
1209 | + * @param string $options String or array of strings (default is array()): |
|
1210 | 1210 | * 'noninitial': This is a non-initial fragment of an id, not a full id, |
1211 | 1211 | * so don't pay attention if the first character isn't valid at the |
1212 | 1212 | * beginning of an id. Only matters if $wgExperimentalHtmlIds is |
@@ -1334,7 +1334,7 @@ discard block |
||
1334 | 1334 | * Pick the appropriate attribute value from a match set from the |
1335 | 1335 | * attribs regex matches. |
1336 | 1336 | * |
1337 | - * @param array $set |
|
1337 | + * @param string[] $set |
|
1338 | 1338 | * @throws MWException When tag conditions are not met. |
1339 | 1339 | * @return string |
1340 | 1340 | */ |
@@ -1850,7 +1850,7 @@ discard block |
||
1850 | 1850 | |
1851 | 1851 | /** |
1852 | 1852 | * @param string $url |
1853 | - * @return mixed|string |
|
1853 | + * @return string |
|
1854 | 1854 | */ |
1855 | 1855 | static function cleanUrl( $url ) { |
1856 | 1856 | # Normalize any HTML entities in input. They will be |
@@ -1936,7 +1936,7 @@ discard block |
||
1936 | 1936 | * @since 1.18 |
1937 | 1937 | * |
1938 | 1938 | * @param string $addr E-mail address |
1939 | - * @return bool |
|
1939 | + * @return null|boolean |
|
1940 | 1940 | */ |
1941 | 1941 | public static function validateEmail( $addr ) { |
1942 | 1942 | $result = null; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | /** |
186 | 186 | * Return the list of ipblocks fields that should be selected to create |
187 | 187 | * a new block. |
188 | - * @return array |
|
188 | + * @return string[] |
|
189 | 189 | */ |
190 | 190 | public static function selectFields() { |
191 | 191 | return [ |
@@ -1004,7 +1004,7 @@ discard block |
||
1004 | 1004 | /** |
1005 | 1005 | * Get a timestamp of the expiry for autoblocks |
1006 | 1006 | * |
1007 | - * @param string|int $timestamp |
|
1007 | + * @param string|false $timestamp |
|
1008 | 1008 | * @return string |
1009 | 1009 | */ |
1010 | 1010 | public static function getAutoblockExpiry( $timestamp ) { |
@@ -1361,7 +1361,7 @@ discard block |
||
1361 | 1361 | /** |
1362 | 1362 | * @since 1.19 |
1363 | 1363 | * |
1364 | - * @return mixed|string |
|
1364 | + * @return string |
|
1365 | 1365 | */ |
1366 | 1366 | public function getExpiry() { |
1367 | 1367 | return $this->mExpiry; |