@@ -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__ ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * Log CSP report, with a different severity depending on $flags |
66 | 66 | * @param $flags Array Flags for this report |
67 | - * @param $logLine String text of log entry |
|
67 | + * @param string $logLine String text of log entry |
|
68 | 68 | * @param $context Array logging context |
69 | 69 | */ |
70 | 70 | private function logReport( $flags, $logLine, $context ) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | * Stop processing the request, and output/log an error |
166 | 166 | * |
167 | 167 | * @param $code String error code |
168 | - * @param $method String method that made error |
|
168 | + * @param string $method String method that made error |
|
169 | 169 | * @throws UsageException Always |
170 | 170 | */ |
171 | 171 | private function error( $code, $method ) { |
@@ -107,7 +107,7 @@ |
||
107 | 107 | /** |
108 | 108 | * Create a FormOptions object with options as specified by the user |
109 | 109 | * |
110 | - * @param array $parameters |
|
110 | + * @param string $parameters |
|
111 | 111 | * |
112 | 112 | * @return FormOptions |
113 | 113 | */ |
@@ -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; |
@@ -100,7 +100,7 @@ |
||
100 | 100 | |
101 | 101 | /** |
102 | 102 | * Fetch the rights allowed by a set of grants. |
103 | - * @param string[]|string $grants |
|
103 | + * @param string[] $grants |
|
104 | 104 | * @return string[] |
105 | 105 | */ |
106 | 106 | public static function getGrantRights( $grants ) { |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | * |
422 | 422 | * @since 1.24 |
423 | 423 | * @param array $params All supplied parameters for the module |
424 | - * @return string|array|null |
|
424 | + * @return string |
|
425 | 425 | */ |
426 | 426 | protected function getWebUITokenSalt( array $params ) { |
427 | 427 | return null; |
@@ -627,6 +627,7 @@ discard block |
||
627 | 627 | /** |
628 | 628 | * Set the continuation manager |
629 | 629 | * @param ApiContinuationManager|null |
630 | + * @param ApiContinuationManager|null $manager |
|
630 | 631 | */ |
631 | 632 | public function setContinuationManager( $manager ) { |
632 | 633 | // Main module has setContinuationManager() method overridden |
@@ -710,6 +711,7 @@ discard block |
||
710 | 711 | * |
711 | 712 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
712 | 713 | * @param string $required,... Names of parameters of which exactly one must be set |
714 | + * @param string $required |
|
713 | 715 | */ |
714 | 716 | public function requireOnlyOneParameter( $params, $required /*...*/ ) { |
715 | 717 | $required = func_get_args(); |
@@ -736,6 +738,7 @@ discard block |
||
736 | 738 | * |
737 | 739 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
738 | 740 | * @param string $required,... Names of parameters of which at most one must be set |
741 | + * @param string $required |
|
739 | 742 | */ |
740 | 743 | public function requireMaxOneParameter( $params, $required /*...*/ ) { |
741 | 744 | $required = func_get_args(); |
@@ -759,6 +762,7 @@ discard block |
||
759 | 762 | * @since 1.23 |
760 | 763 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
761 | 764 | * @param string $required,... Names of parameters of which at least one must be set |
765 | + * @param string $required |
|
762 | 766 | */ |
763 | 767 | public function requireAtLeastOneParameter( $params, $required /*...*/ ) { |
764 | 768 | $required = func_get_args(); |
@@ -2543,7 +2547,7 @@ discard block |
||
2543 | 2547 | * "apihelp-{$this->getModulePath()}-description". |
2544 | 2548 | * |
2545 | 2549 | * @deprecated since 1.25 |
2546 | - * @return Message|string|array |
|
2550 | + * @return boolean |
|
2547 | 2551 | */ |
2548 | 2552 | protected function getDescription() { |
2549 | 2553 | return false; |
@@ -2698,7 +2702,7 @@ discard block |
||
2698 | 2702 | * Generates the parameter descriptions for this module, to be displayed in the |
2699 | 2703 | * module's help. |
2700 | 2704 | * @deprecated since 1.25 |
2701 | - * @return string|bool |
|
2705 | + * @return string|false |
|
2702 | 2706 | */ |
2703 | 2707 | public function makeHelpMsgParameters() { |
2704 | 2708 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -2889,7 +2893,7 @@ discard block |
||
2889 | 2893 | |
2890 | 2894 | /** |
2891 | 2895 | * @deprecated since 1.25, always returns 0 |
2892 | - * @return float |
|
2896 | + * @return integer |
|
2893 | 2897 | */ |
2894 | 2898 | public function getProfileTime() { |
2895 | 2899 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -2912,7 +2916,7 @@ discard block |
||
2912 | 2916 | |
2913 | 2917 | /** |
2914 | 2918 | * @deprecated since 1.25, always returns 0 |
2915 | - * @return float |
|
2919 | + * @return integer |
|
2916 | 2920 | */ |
2917 | 2921 | public function getProfileDBTime() { |
2918 | 2922 | wfDeprecated( __METHOD__, '1.25' ); |