@@ -60,7 +60,7 @@ |
||
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * Get the HTMLForm to control behavior |
| 63 | - * @return HTMLForm|null |
|
| 63 | + * @return HTMLForm |
|
| 64 | 64 | */ |
| 65 | 65 | protected function getForm() { |
| 66 | 66 | $this->fields = $this->getFormFields(); |
@@ -523,6 +523,10 @@ |
||
| 523 | 523 | return $s; |
| 524 | 524 | } |
| 525 | 525 | |
| 526 | + /** |
|
| 527 | + * @param string $name |
|
| 528 | + * @param string $msg |
|
| 529 | + */ |
|
| 526 | 530 | private function getRevisionButton( $name, $msg ) { |
| 527 | 531 | $this->preventClickjacking(); |
| 528 | 532 | # Note bug #20966, <button> is non-standard in IE<8 |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | * Returning true will generate errors indicating that the API module needs |
| 407 | 407 | * updating. |
| 408 | 408 | * |
| 409 | - * @return string|false |
|
| 409 | + * @return boolean |
|
| 410 | 410 | */ |
| 411 | 411 | public function needsToken() { |
| 412 | 412 | return false; |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | * |
| 420 | 420 | * @since 1.24 |
| 421 | 421 | * @param array $params All supplied parameters for the module |
| 422 | - * @return string|array|null |
|
| 422 | + * @return string |
|
| 423 | 423 | */ |
| 424 | 424 | protected function getWebUITokenSalt( array $params ) { |
| 425 | 425 | return null; |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | * RFC 7232 § 2.2 for semantics. |
| 436 | 436 | * - etag: Return an entity-tag representing the state of all resources involved |
| 437 | 437 | * in the request. Quotes must be included. See RFC 7232 § 2.3 for semantics. |
| 438 | - * @return string|boolean|null As described above, or null if no value is available. |
|
| 438 | + * @return string As described above, or null if no value is available. |
|
| 439 | 439 | */ |
| 440 | 440 | public function getConditionalRequestData( $condition ) { |
| 441 | 441 | return null; |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | /** |
| 485 | 485 | * Get the parent of this module |
| 486 | 486 | * @since 1.25 |
| 487 | - * @return ApiBase|null |
|
| 487 | + * @return ApiMain |
|
| 488 | 488 | */ |
| 489 | 489 | public function getParent() { |
| 490 | 490 | return $this->isMain() ? null : $this->getMain(); |
@@ -619,6 +619,7 @@ discard block |
||
| 619 | 619 | /** |
| 620 | 620 | * Set the continuation manager |
| 621 | 621 | * @param ApiContinuationManager|null |
| 622 | + * @param ApiContinuationManager|null $manager |
|
| 622 | 623 | */ |
| 623 | 624 | public function setContinuationManager( $manager ) { |
| 624 | 625 | // Main module has setContinuationManager() method overridden |
@@ -692,6 +693,7 @@ discard block |
||
| 692 | 693 | * |
| 693 | 694 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
| 694 | 695 | * @param string $required,... Names of parameters of which exactly one must be set |
| 696 | + * @param string $required |
|
| 695 | 697 | */ |
| 696 | 698 | public function requireOnlyOneParameter( $params, $required /*...*/ ) { |
| 697 | 699 | $required = func_get_args(); |
@@ -718,6 +720,7 @@ discard block |
||
| 718 | 720 | * |
| 719 | 721 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
| 720 | 722 | * @param string $required,... Names of parameters of which at most one must be set |
| 723 | + * @param string $required |
|
| 721 | 724 | */ |
| 722 | 725 | public function requireMaxOneParameter( $params, $required /*...*/ ) { |
| 723 | 726 | $required = func_get_args(); |
@@ -741,6 +744,7 @@ discard block |
||
| 741 | 744 | * @since 1.23 |
| 742 | 745 | * @param array $params User provided set of parameters, as from $this->extractRequestParams() |
| 743 | 746 | * @param string $required,... Names of parameters of which at least one must be set |
| 747 | + * @param string $required |
|
| 744 | 748 | */ |
| 745 | 749 | public function requireAtLeastOneParameter( $params, $required /*...*/ ) { |
| 746 | 750 | $required = func_get_args(); |
@@ -2533,7 +2537,7 @@ discard block |
||
| 2533 | 2537 | * has been removed. |
| 2534 | 2538 | * |
| 2535 | 2539 | * @deprecated since 1.24 |
| 2536 | - * @return array|bool |
|
| 2540 | + * @return boolean |
|
| 2537 | 2541 | */ |
| 2538 | 2542 | protected function getResultProperties() { |
| 2539 | 2543 | wfDeprecated( __METHOD__, '1.24' ); |
@@ -2640,7 +2644,7 @@ discard block |
||
| 2640 | 2644 | * "apihelp-{$this->getModulePath()}-description". |
| 2641 | 2645 | * |
| 2642 | 2646 | * @deprecated since 1.25 |
| 2643 | - * @return Message|string|array |
|
| 2647 | + * @return boolean |
|
| 2644 | 2648 | */ |
| 2645 | 2649 | protected function getDescription() { |
| 2646 | 2650 | return false; |
@@ -2676,7 +2680,7 @@ discard block |
||
| 2676 | 2680 | * that value, and boolean false means "no examples". |
| 2677 | 2681 | * |
| 2678 | 2682 | * @deprecated since 1.25, use getExamplesMessages() instead |
| 2679 | - * @return bool|string|array |
|
| 2683 | + * @return boolean |
|
| 2680 | 2684 | */ |
| 2681 | 2685 | protected function getExamples() { |
| 2682 | 2686 | return false; |
@@ -2685,7 +2689,7 @@ discard block |
||
| 2685 | 2689 | /** |
| 2686 | 2690 | * Generates help message for this module, or false if there is no description |
| 2687 | 2691 | * @deprecated since 1.25 |
| 2688 | - * @return string|bool |
|
| 2692 | + * @return string |
|
| 2689 | 2693 | */ |
| 2690 | 2694 | public function makeHelpMsg() { |
| 2691 | 2695 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -2795,7 +2799,7 @@ discard block |
||
| 2795 | 2799 | * Generates the parameter descriptions for this module, to be displayed in the |
| 2796 | 2800 | * module's help. |
| 2797 | 2801 | * @deprecated since 1.25 |
| 2798 | - * @return string|bool |
|
| 2802 | + * @return string|false |
|
| 2799 | 2803 | */ |
| 2800 | 2804 | public function makeHelpMsgParameters() { |
| 2801 | 2805 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -2986,7 +2990,7 @@ discard block |
||
| 2986 | 2990 | |
| 2987 | 2991 | /** |
| 2988 | 2992 | * @deprecated since 1.25, always returns 0 |
| 2989 | - * @return float |
|
| 2993 | + * @return integer |
|
| 2990 | 2994 | */ |
| 2991 | 2995 | public function getProfileTime() { |
| 2992 | 2996 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -3009,7 +3013,7 @@ discard block |
||
| 3009 | 3013 | |
| 3010 | 3014 | /** |
| 3011 | 3015 | * @deprecated since 1.25, always returns 0 |
| 3012 | - * @return float |
|
| 3016 | + * @return integer |
|
| 3013 | 3017 | */ |
| 3014 | 3018 | public function getProfileDBTime() { |
| 3015 | 3019 | wfDeprecated( __METHOD__, '1.25' ); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | /** |
| 71 | 71 | * Add a warning to the result |
| 72 | 72 | * @param string $moduleName |
| 73 | - * @param MessageSpecifier|array|string $msg i18n message for the warning |
|
| 73 | + * @param ApiRawMessage $msg i18n message for the warning |
|
| 74 | 74 | * @param string $code Machine-readable code for the warning. Defaults as |
| 75 | 75 | * for IApiMessage::getApiCode(). |
| 76 | 76 | * @param array $data Machine-readable data for the warning, if any. |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | * Actually add the warning or error to the result |
| 182 | 182 | * @param string $tag 'warning' or 'error' |
| 183 | 183 | * @param string $moduleName |
| 184 | - * @param ApiMessage|ApiRawMessage $msg |
|
| 184 | + * @param Message $msg |
|
| 185 | 185 | */ |
| 186 | 186 | protected function addWarningOrError( $tag, $moduleName, $msg ) { |
| 187 | 187 | $value = array( 'code' => $msg->getApiCode() ); |
@@ -39,6 +39,9 @@ |
||
| 39 | 39 | return 'text/xml'; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param string $rootElemName |
|
| 44 | + */ |
|
| 42 | 45 | public function setRootElement( $rootElemName ) { |
| 43 | 46 | $this->mRootElemName = $rootElemName; |
| 44 | 47 | } |
@@ -53,12 +53,14 @@ |
||
| 53 | 53 | * Sets the machine-readable code for use by the API |
| 54 | 54 | * @param string|null $code If null, the message key should be returned by self::getApiCode() |
| 55 | 55 | * @param array|null $data If non-null, passed to self::setApiData() |
| 56 | + * @return void |
|
| 56 | 57 | */ |
| 57 | 58 | public function setApiCode( $code, array $data = null ); |
| 58 | 59 | |
| 59 | 60 | /** |
| 60 | 61 | * Sets additional machine-readable data about the error condition |
| 61 | 62 | * @param array $data |
| 63 | + * @return void |
|
| 62 | 64 | */ |
| 63 | 65 | public function setApiData( array $data ); |
| 64 | 66 | } |
@@ -377,6 +377,9 @@ |
||
| 377 | 377 | class ApiOpenSearchFormatJson extends ApiFormatJson { |
| 378 | 378 | private $warningsAsError = false; |
| 379 | 379 | |
| 380 | + /** |
|
| 381 | + * @param string $fm |
|
| 382 | + */ |
|
| 380 | 383 | public function __construct( ApiMain $main, $fm, $warningsAsError ) { |
| 381 | 384 | parent::__construct( $main, "json$fm" ); |
| 382 | 385 | $this->warningsAsError = $warningsAsError; |
@@ -576,7 +576,7 @@ |
||
| 576 | 576 | /** |
| 577 | 577 | * Get an array of invalid/special/missing titles. |
| 578 | 578 | * |
| 579 | - * @param array $invalidChecks List of types of invalid titles to include. |
|
| 579 | + * @param string[] $invalidChecks List of types of invalid titles to include. |
|
| 580 | 580 | * Recognized values are: |
| 581 | 581 | * - invalidTitles: Titles and reasons from $this->getInvalidTitlesAndReasons() |
| 582 | 582 | * - special: Titles from $this->getSpecialTitles() |
@@ -560,7 +560,7 @@ |
||
| 560 | 560 | * |
| 561 | 561 | * @param Title $title of the page being parsed |
| 562 | 562 | * @param Array $params the API parameters of the request |
| 563 | - * @return Content|bool |
|
| 563 | + * @return string |
|
| 564 | 564 | */ |
| 565 | 565 | private function formatSummary( $title, $params ) { |
| 566 | 566 | global $wgParser; |