@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * See ApiQuery::getNamedDB() for more information |
119 | 119 | * @param string $name Name to assign to the database connection |
120 | 120 | * @param int $db One of the DB_* constants |
121 | - * @param array $groups Query groups |
|
121 | + * @param string $groups Query groups |
|
122 | 122 | * @return Database |
123 | 123 | */ |
124 | 124 | public function selectNamedDB( $name, $db, $groups ) { |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | * here in the same way it treats a false return from addValue(). |
399 | 399 | * |
400 | 400 | * @since 1.28 |
401 | - * @param object $row Database row |
|
401 | + * @param stdClass|null $row Database row |
|
402 | 402 | * @param array &$data Data to be added to the result |
403 | 403 | * @param array &$hookData Hook data from ApiQueryBase::select() |
404 | 404 | * @return bool Return false if row processing should end with continuation |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | |
582 | 582 | /** |
583 | 583 | * @param string $hash |
584 | - * @return bool |
|
584 | + * @return integer |
|
585 | 585 | */ |
586 | 586 | public function validateSha1Hash( $hash ) { |
587 | 587 | return preg_match( '/^[a-f0-9]{40}$/', $hash ); |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | |
590 | 590 | /** |
591 | 591 | * @param string $hash |
592 | - * @return bool |
|
592 | + * @return integer |
|
593 | 593 | */ |
594 | 594 | public function validateSha1Base36Hash( $hash ) { |
595 | 595 | return preg_match( '/^[a-z0-9]{31}$/', $hash ); |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | |
810 | 810 | /** |
811 | 811 | * Determine if the stack has $tag in button scope. |
812 | - * @param BalanceElement|array|string $tag |
|
812 | + * @param string $tag |
|
813 | 813 | * @return bool |
814 | 814 | * @see https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope |
815 | 815 | */ |
@@ -899,6 +899,7 @@ discard block |
||
899 | 899 | |
900 | 900 | /** |
901 | 901 | * Return the adjusted current node. |
902 | + * @param BalanceElement|null $fragmentContext |
|
902 | 903 | */ |
903 | 904 | public function adjustedCurrentNode( $fragmentContext ) { |
904 | 905 | return ( $fragmentContext && count( $this->elements ) === 1 ) ? |
@@ -1144,7 +1145,7 @@ discard block |
||
1144 | 1145 | * @param string $tag The subject tag name. |
1145 | 1146 | * @param BalanceActiveFormattingElements $afe The current |
1146 | 1147 | * active formatting elements list. |
1147 | - * @return true if the adoption agency algorithm "did something", false |
|
1148 | + * @return boolean if the adoption agency algorithm "did something", false |
|
1148 | 1149 | * if more processing is required by the caller. |
1149 | 1150 | * @see https://html.spec.whatwg.org/multipage/syntax.html#adoption-agency-algorithm |
1150 | 1151 | */ |
@@ -1510,6 +1511,7 @@ discard block |
||
1510 | 1511 | * Find and return the last element with the specified tag between the |
1511 | 1512 | * end of the list and the last marker on the list. |
1512 | 1513 | * Used when parsing <a> "in body mode". |
1514 | + * @param string $tag |
|
1513 | 1515 | */ |
1514 | 1516 | public function findElementByTag( $tag ) { |
1515 | 1517 | $elt = $this->tail; |
@@ -1666,6 +1668,10 @@ discard block |
||
1666 | 1668 | * @see https://html.spec.whatwg.org/multipage/syntax.html#reconstruct-the-active-formatting-elements |
1667 | 1669 | */ |
1668 | 1670 | // @codingStandardsIgnoreEnd |
1671 | + |
|
1672 | + /** |
|
1673 | + * @param BalanceStack $stack |
|
1674 | + */ |
|
1669 | 1675 | public function reconstruct( $stack ) { |
1670 | 1676 | $entry = $this->tail; |
1671 | 1677 | // If there are no entries in the list of active formatting elements, |
@@ -2240,6 +2246,10 @@ discard block |
||
2240 | 2246 | return $oldMode; |
2241 | 2247 | } |
2242 | 2248 | |
2249 | + /** |
|
2250 | + * @param string $mode |
|
2251 | + * @param boolean $selfClose |
|
2252 | + */ |
|
2243 | 2253 | private function switchModeAndReprocess( $mode, $token, $value, $attribs, $selfClose ) { |
2244 | 2254 | $this->switchMode( $mode ); |
2245 | 2255 | return $this->insertToken( $token, $value, $attribs, $selfClose ); |
@@ -3325,6 +3335,11 @@ discard block |
||
3325 | 3335 | return false; |
3326 | 3336 | } |
3327 | 3337 | } |
3338 | + |
|
3339 | + /** |
|
3340 | + * @param string $token |
|
3341 | + * @param string $value |
|
3342 | + */ |
|
3328 | 3343 | private function inCellMode( $token, $value, $attribs = null, $selfClose = false ) { |
3329 | 3344 | if ( $token === 'tag' ) { |
3330 | 3345 | switch ( $value ) { |
@@ -29,13 +29,15 @@ discard block |
||
29 | 29 | * Get a Message object with its context set |
30 | 30 | * |
31 | 31 | * @param string $name Message name |
32 | - * @param ... $params Message params |
|
33 | 32 | * @return Message |
34 | 33 | */ |
35 | 34 | public function getMsg( $name /* ... */ ) { |
36 | 35 | return call_user_func_array( [ $this->getSkin(), 'msg' ], func_get_args() ); |
37 | 36 | } |
38 | 37 | |
38 | + /** |
|
39 | + * @param string $str |
|
40 | + */ |
|
39 | 41 | function msg( $str ) { |
40 | 42 | echo $this->getMsg( $str )->escaped(); |
41 | 43 | } |
@@ -507,6 +509,9 @@ discard block |
||
507 | 509 | return Html::element( 'input', $realAttrs ); |
508 | 510 | } |
509 | 511 | |
512 | + /** |
|
513 | + * @param string $mode |
|
514 | + */ |
|
510 | 515 | function makeSearchButton( $mode, $attrs = [] ) { |
511 | 516 | switch ( $mode ) { |
512 | 517 | case 'go': |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * Constructor |
107 | 107 | * @param IContextSource $context Context to use, anything else will be ignored |
108 | 108 | * @param int $old Old ID we want to show and diff with. |
109 | - * @param string|int $new Either revision ID or 'prev' or 'next'. Default: 0. |
|
109 | + * @param integer $new Either revision ID or 'prev' or 'next'. Default: 0. |
|
110 | 110 | * @param int $rcid Deprecated, no longer used! |
111 | 111 | * @param bool $refreshCache If set, refreshes the diff cache |
112 | 112 | * @param bool $unhide If set, allow viewing deleted revs |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * |
177 | 177 | * @param int $id Revision ID |
178 | 178 | * |
179 | - * @return string|bool Link HTML or false |
|
179 | + * @return string|false Link HTML or false |
|
180 | 180 | */ |
181 | 181 | public function deletedLink( $id ) { |
182 | 182 | if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) { |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | * @param string|bool $ntitle Header for new text or false |
713 | 713 | * @param string $notice HTML between diff header and body |
714 | 714 | * |
715 | - * @return mixed |
|
715 | + * @return false|string |
|
716 | 716 | */ |
717 | 717 | public function getDiff( $otitle, $ntitle, $notice = '' ) { |
718 | 718 | $body = $this->getDiffBody(); |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | /** |
735 | 735 | * Get the diff table body, without header |
736 | 736 | * |
737 | - * @return mixed (string/false) |
|
737 | + * @return false|string (string/false) |
|
738 | 738 | */ |
739 | 739 | public function getDiffBody() { |
740 | 740 | $this->mCacheHit = true; |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | * |
997 | 997 | * @param string $text |
998 | 998 | * |
999 | - * @return mixed |
|
999 | + * @return string |
|
1000 | 1000 | */ |
1001 | 1001 | public function localiseLineNumbers( $text ) { |
1002 | 1002 | return preg_replace_callback( |