| @@ -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; | 
| @@ -49,7 +49,7 @@ | ||
| 49 | 49 | |
| 50 | 50 | /** | 
| 51 | 51 | * @param string $hexSortkey | 
| 52 | - * @return bool | |
| 52 | + * @return integer | |
| 53 | 53 | */ | 
| 54 | 54 |  	private function validateHexSortkey( $hexSortkey ) { | 
| 55 | 55 | // A hex sortkey has an unbound number of 2 letter pairs | 
| @@ -202,6 +202,9 @@ | ||
| 202 | 202 | return $protocols; | 
| 203 | 203 | } | 
| 204 | 204 | |
| 205 | + /** | |
| 206 | + * @return string|null | |
| 207 | + */ | |
| 205 | 208 |  	public static function getProtocolPrefix( $protocol ) { | 
| 206 | 209 | // Find the right prefix | 
| 207 | 210 | global $wgUrlProtocols; | 
| @@ -469,7 +469,7 @@ discard block | ||
| 469 | 469 | * | 
| 470 | 470 | * @since 1.25 | 
| 471 | 471 | * @param array &$arr To add $value to | 
| 472 | - * @param string|int $name Index of $arr to add $value at. | |
| 472 | + * @param string $name Index of $arr to add $value at. | |
| 473 | 473 | * @param mixed $value | 
| 474 | 474 | * @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. | 
| 475 | 475 | */ | 
| @@ -486,10 +486,10 @@ discard block | ||
| 486 | 486 | * | 
| 487 | 487 | * @since 1.25 | 
| 488 | 488 | * @param array|string|null $path See ApiResult::addValue() | 
| 489 | - * @param string|int $name See ApiResult::setValue() | |
| 489 | + * @param string $name See ApiResult::setValue() | |
| 490 | 490 | * @param mixed $value | 
| 491 | 491 | * @param int $flags Zero or more OR-ed flags like OVERRIDE | ADD_ON_TOP. | 
| 492 | - * @return bool True if $value fits in the result, false if not | |
| 492 | + * @return boolean|null True if $value fits in the result, false if not | |
| 493 | 493 | */ | 
| 494 | 494 |  	public function addContentValue( $path, $name, $value, $flags = 0 ) { | 
| 495 | 495 |  		if ( $name === null ) { | 
| @@ -573,7 +573,7 @@ discard block | ||
| 573 | 573 | * subelements rather than attributes. | 
| 574 | 574 | * @since 1.25 | 
| 575 | 575 | * @param array|string|null $path See ApiResult::addValue() | 
| 576 | - * @param array|string|int $names The element name(s) to be output as subelements | |
| 576 | + * @param string $names The element name(s) to be output as subelements | |
| 577 | 577 | */ | 
| 578 | 578 |  	public function addSubelementsList( $path, $names ) { | 
| 579 | 579 | $arr = &$this->path( $path ); |