@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | |
801 | 801 | /** |
802 | 802 | * Determine if the stack has $tag in button scope. |
803 | - * @param BalanceElement|array|string $tag |
|
803 | + * @param string $tag |
|
804 | 804 | * @return bool |
805 | 805 | * @see https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope |
806 | 806 | */ |
@@ -890,6 +890,7 @@ discard block |
||
890 | 890 | |
891 | 891 | /** |
892 | 892 | * Return the adjusted current node. |
893 | + * @param BalanceElement|null $fragmentContext |
|
893 | 894 | */ |
894 | 895 | public function adjustedCurrentNode( $fragmentContext ) { |
895 | 896 | return ( $fragmentContext && count( $this->elements ) === 1 ) ? |
@@ -899,7 +900,7 @@ discard block |
||
899 | 900 | /** |
900 | 901 | * Return an iterator over this stack which visits the current node |
901 | 902 | * first, and the root node last. |
902 | - * @return Iterator |
|
903 | + * @return ReverseArrayIterator |
|
903 | 904 | */ |
904 | 905 | public function getIterator() { |
905 | 906 | return new ReverseArrayIterator( $this->elements ); |
@@ -1133,7 +1134,7 @@ discard block |
||
1133 | 1134 | * @param string $tag The subject tag name. |
1134 | 1135 | * @param BalanceActiveFormattingElements $afe The current |
1135 | 1136 | * active formatting elements list. |
1136 | - * @return true if the adoption agency algorithm "did something", false |
|
1137 | + * @return boolean if the adoption agency algorithm "did something", false |
|
1137 | 1138 | * if more processing is required by the caller. |
1138 | 1139 | * @see https://html.spec.whatwg.org/multipage/syntax.html#adoption-agency-algorithm |
1139 | 1140 | */ |
@@ -1499,6 +1500,7 @@ discard block |
||
1499 | 1500 | * Find and return the last element with the specified tag between the |
1500 | 1501 | * end of the list and the last marker on the list. |
1501 | 1502 | * Used when parsing <a> "in body mode". |
1503 | + * @param string $tag |
|
1502 | 1504 | */ |
1503 | 1505 | public function findElementByTag( $tag ) { |
1504 | 1506 | $elt = $this->tail; |
@@ -1646,6 +1648,10 @@ discard block |
||
1646 | 1648 | * @see https://html.spec.whatwg.org/multipage/syntax.html#reconstruct-the-active-formatting-elements |
1647 | 1649 | */ |
1648 | 1650 | // @codingStandardsIgnoreEnd |
1651 | + |
|
1652 | + /** |
|
1653 | + * @param BalanceStack|null $stack |
|
1654 | + */ |
|
1649 | 1655 | public function reconstruct( $stack ) { |
1650 | 1656 | $entry = $this->tail; |
1651 | 1657 | // If there are no entries in the list of active formatting elements, |
@@ -2214,6 +2220,10 @@ discard block |
||
2214 | 2220 | return $oldMode; |
2215 | 2221 | } |
2216 | 2222 | |
2223 | + /** |
|
2224 | + * @param string $mode |
|
2225 | + * @param boolean $selfClose |
|
2226 | + */ |
|
2217 | 2227 | private function switchModeAndReprocess( $mode, $token, $value, $attribs, $selfClose ) { |
2218 | 2228 | $this->switchMode( $mode ); |
2219 | 2229 | return $this->insertToken( $token, $value, $attribs, $selfClose ); |
@@ -3299,6 +3309,11 @@ discard block |
||
3299 | 3309 | return false; |
3300 | 3310 | } |
3301 | 3311 | } |
3312 | + |
|
3313 | + /** |
|
3314 | + * @param string $token |
|
3315 | + * @param string $value |
|
3316 | + */ |
|
3302 | 3317 | private function inCellMode( $token, $value, $attribs = null, $selfClose = false ) { |
3303 | 3318 | if ( $token === 'tag' ) { |
3304 | 3319 | switch ( $value ) { |
@@ -128,7 +128,7 @@ |
||
128 | 128 | /** |
129 | 129 | * Generates the subheading with links |
130 | 130 | * @param User $userObj User object for the target |
131 | - * @return string Appropriately-escaped HTML to be output literally |
|
131 | + * @return Message Appropriately-escaped HTML to be output literally |
|
132 | 132 | * @todo FIXME: Almost the same as contributionsSub in SpecialContributions.php. Could be combined. |
133 | 133 | */ |
134 | 134 | function getSubTitle( $userObj ) { |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | /** |
183 | 183 | * @param string $sizetype "min" or "max" |
184 | - * @param mixed $size |
|
184 | + * @param integer $size |
|
185 | 185 | * @return string Formatted HTML |
186 | 186 | */ |
187 | 187 | protected function getSizeLimit( $sizetype, $size ) { |
@@ -290,9 +290,9 @@ discard block |
||
290 | 290 | /** |
291 | 291 | * @param SpecialProtectedpages $form |
292 | 292 | * @param array $conds |
293 | - * @param $type |
|
294 | - * @param $level |
|
295 | - * @param $namespace |
|
293 | + * @param null|string $type |
|
294 | + * @param null|string $level |
|
295 | + * @param integer|null $namespace |
|
296 | 296 | * @param string $sizetype |
297 | 297 | * @param int $size |
298 | 298 | * @param bool $indefonly |
@@ -35,6 +35,9 @@ discard block |
||
35 | 35 | return $this->getSkin()->msg( $name ); |
36 | 36 | } |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $str |
|
40 | + */ |
|
38 | 41 | function msg( $str ) { |
39 | 42 | echo $this->getMsg( $str )->escaped(); |
40 | 43 | } |
@@ -506,6 +509,9 @@ discard block |
||
506 | 509 | return Html::element( 'input', $realAttrs ); |
507 | 510 | } |
508 | 511 | |
512 | + /** |
|
513 | + * @param string $mode |
|
514 | + */ |
|
509 | 515 | function makeSearchButton( $mode, $attrs = [] ) { |
510 | 516 | switch ( $mode ) { |
511 | 517 | case 'go': |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | /** |
1182 | 1182 | * Load user data from the session. |
1183 | 1183 | * |
1184 | - * @return bool True if the user is logged in, false otherwise. |
|
1184 | + * @return null|boolean True if the user is logged in, false otherwise. |
|
1185 | 1185 | */ |
1186 | 1186 | private function loadFromSession() { |
1187 | 1187 | // Deprecated hook |
@@ -2855,7 +2855,7 @@ discard block |
||
2855 | 2855 | * resetting it if it's empty (and saving changes). |
2856 | 2856 | * |
2857 | 2857 | * @param string $oname The option name to retrieve the token from |
2858 | - * @return string|bool User's current value for the option, or false if this option is disabled. |
|
2858 | + * @return false|string User's current value for the option, or false if this option is disabled. |
|
2859 | 2859 | * @see resetTokenFromOption() |
2860 | 2860 | * @see getOption() |
2861 | 2861 | * @deprecated since 1.26 Applications should use the OAuth extension |
@@ -2884,7 +2884,7 @@ discard block |
||
2884 | 2884 | * *Does not* save user's preferences (similarly to setOption()). |
2885 | 2885 | * |
2886 | 2886 | * @param string $oname The option name to reset the token in |
2887 | - * @return string|bool New token value, or false if this option is disabled. |
|
2887 | + * @return false|string New token value, or false if this option is disabled. |
|
2888 | 2888 | * @see getTokenFromOption() |
2889 | 2889 | * @see setOption() |
2890 | 2890 | */ |
@@ -2920,7 +2920,7 @@ discard block |
||
2920 | 2920 | * new option kind is added. |
2921 | 2921 | * |
2922 | 2922 | * @see User::getOptionKinds |
2923 | - * @return array Option kinds |
|
2923 | + * @return string[] Option kinds |
|
2924 | 2924 | */ |
2925 | 2925 | public static function listOptionKinds() { |
2926 | 2926 | return [ |
@@ -4474,7 +4474,7 @@ discard block |
||
4474 | 4474 | /** |
4475 | 4475 | * Get the timestamp of account creation. |
4476 | 4476 | * |
4477 | - * @return string|bool|null Timestamp of account creation, false for |
|
4477 | + * @return false|string Timestamp of account creation, false for |
|
4478 | 4478 | * non-existent/anonymous user accounts, or null if existing account |
4479 | 4479 | * but information is not in database. |
4480 | 4480 | */ |
@@ -4489,7 +4489,7 @@ discard block |
||
4489 | 4489 | /** |
4490 | 4490 | * Get the timestamp of the first edit |
4491 | 4491 | * |
4492 | - * @return string|bool Timestamp of first edit, or false for |
|
4492 | + * @return false|string Timestamp of first edit, or false for |
|
4493 | 4493 | * non-existent/anonymous user accounts. |
4494 | 4494 | */ |
4495 | 4495 | public function getFirstEditTimestamp() { |
@@ -5259,7 +5259,7 @@ discard block |
||
5259 | 5259 | /** |
5260 | 5260 | * Return the list of user fields that should be selected to create |
5261 | 5261 | * a new user object. |
5262 | - * @return array |
|
5262 | + * @return string[] |
|
5263 | 5263 | */ |
5264 | 5264 | public static function selectFields() { |
5265 | 5265 | return [ |
@@ -663,7 +663,7 @@ |
||
663 | 663 | * Handles a stash exception, giving a useful error to the user. |
664 | 664 | * @param string $exceptionType Class name of the exception we encountered. |
665 | 665 | * @param string $message Message of the exception we encountered. |
666 | - * @return array Array of message and code, suitable for passing to dieUsage() |
|
666 | + * @return string[] Array of message and code, suitable for passing to dieUsage() |
|
667 | 667 | */ |
668 | 668 | protected function handleStashException( $exceptionType, $message ) { |
669 | 669 | switch ( $exceptionType ) { |
@@ -92,6 +92,10 @@ discard block |
||
92 | 92 | fclose( $file ); |
93 | 93 | } |
94 | 94 | |
95 | + /** |
|
96 | + * @param resource $file |
|
97 | + * @param integer $indent |
|
98 | + */ |
|
95 | 99 | private function dumpForm( $file, $length, $indent ) { |
96 | 100 | $start = ftell( $file ); |
97 | 101 | $secondary = fread( $file, 4 ); |
@@ -165,6 +169,9 @@ discard block |
||
165 | 169 | } |
166 | 170 | } |
167 | 171 | |
172 | + /** |
|
173 | + * @param integer $chunkLength |
|
174 | + */ |
|
168 | 175 | private function skipChunk( $file, $chunkLength ) { |
169 | 176 | fseek( $file, $chunkLength, SEEK_CUR ); |
170 | 177 | |
@@ -174,6 +181,9 @@ discard block |
||
174 | 181 | } |
175 | 182 | } |
176 | 183 | |
184 | + /** |
|
185 | + * @param resource $file |
|
186 | + */ |
|
177 | 187 | private function getMultiPageInfo( $file, $formLength ) { |
178 | 188 | // For now, we'll just look for the first page in the file |
179 | 189 | // and report its information, hoping others are the same size. |
@@ -368,6 +378,9 @@ discard block |
||
368 | 378 | return $xml; |
369 | 379 | } |
370 | 380 | |
381 | + /** |
|
382 | + * @param string $line |
|
383 | + */ |
|
371 | 384 | function parseFormDjvu( $line, &$xml ) { |
372 | 385 | $parentLevel = strspn( $line, ' ' ); |
373 | 386 | $line = strtok( "\n" ); |
@@ -104,7 +104,6 @@ |
||
104 | 104 | * |
105 | 105 | * See OutputPage::buildExemptModules() for use cases. |
106 | 106 | * |
107 | - * @param array $modules Module state keyed by module name |
|
108 | 107 | */ |
109 | 108 | public function setExemptStates( array $states ) { |
110 | 109 | $this->exemptStates = $states; |
@@ -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 ) { |