@@ -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; |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | |
752 | 752 | /** |
753 | 753 | * Determine if the stack has $tag in button scope. |
754 | - * @param BalanceElement|array|string $tag |
|
754 | + * @param string $tag |
|
755 | 755 | * @return bool |
756 | 756 | * @see https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope |
757 | 757 | */ |
@@ -831,6 +831,7 @@ discard block |
||
831 | 831 | |
832 | 832 | /** |
833 | 833 | * Return the adjusted current node. |
834 | + * @param BalanceElement|null $fragmentContext |
|
834 | 835 | */ |
835 | 836 | public function adjustedCurrentNode( $fragmentContext ) { |
836 | 837 | return ( $fragmentContext && $this->length() === 1 ) ? |
@@ -840,7 +841,7 @@ discard block |
||
840 | 841 | /** |
841 | 842 | * Return an iterator over this stack which visits the current node |
842 | 843 | * first, and the root node last. |
843 | - * @return Iterator |
|
844 | + * @return ReverseArrayIterator |
|
844 | 845 | */ |
845 | 846 | public function getIterator() { |
846 | 847 | return new ReverseArrayIterator( $this->elements ); |
@@ -1063,7 +1064,7 @@ discard block |
||
1063 | 1064 | * @param string $tag The subject tag name. |
1064 | 1065 | * @param BalanceActiveFormattingElements $afe The current |
1065 | 1066 | * active formatting elements list. |
1066 | - * @return true if the adoption agency algorithm "did something", false |
|
1067 | + * @return boolean if the adoption agency algorithm "did something", false |
|
1067 | 1068 | * if more processing is required by the caller. |
1068 | 1069 | * @see https://html.spec.whatwg.org/multipage/syntax.html#adoption-agency-algorithm |
1069 | 1070 | */ |
@@ -1441,6 +1442,7 @@ discard block |
||
1441 | 1442 | * Find and return the last element with the specified tag between the |
1442 | 1443 | * end of the list and the last marker on the list. |
1443 | 1444 | * Used when parsing <a> "in body mode". |
1445 | + * @param string $tag |
|
1444 | 1446 | */ |
1445 | 1447 | public function findElementByTag( $tag ) { |
1446 | 1448 | $elt = $this->tail; |
@@ -1588,6 +1590,10 @@ discard block |
||
1588 | 1590 | * @see https://html.spec.whatwg.org/multipage/syntax.html#reconstruct-the-active-formatting-elements |
1589 | 1591 | */ |
1590 | 1592 | // @codingStandardsIgnoreEnd |
1593 | + |
|
1594 | + /** |
|
1595 | + * @param BalanceStack|null $stack |
|
1596 | + */ |
|
1591 | 1597 | public function reconstruct( $stack ) { |
1592 | 1598 | $entry = $this->tail; |
1593 | 1599 | // If there are no entries in the list of active formatting elements, |
@@ -2051,6 +2057,10 @@ discard block |
||
2051 | 2057 | return $oldMode; |
2052 | 2058 | } |
2053 | 2059 | |
2060 | + /** |
|
2061 | + * @param string $mode |
|
2062 | + * @param boolean $selfclose |
|
2063 | + */ |
|
2054 | 2064 | private function switchModeAndReprocess( $mode, $token, $value, $attribs, $selfclose ) { |
2055 | 2065 | $this->switchMode( $mode ); |
2056 | 2066 | return $this->insertToken( $token, $value, $attribs, $selfclose ); |
@@ -3080,6 +3090,11 @@ discard block |
||
3080 | 3090 | return false; |
3081 | 3091 | } |
3082 | 3092 | } |
3093 | + |
|
3094 | + /** |
|
3095 | + * @param string $token |
|
3096 | + * @param string $value |
|
3097 | + */ |
|
3083 | 3098 | private function inCellMode( $token, $value, $attribs = null, $selfclose = false ) { |
3084 | 3099 | if ( $token === 'tag' ) { |
3085 | 3100 | switch ( $value ) { |