@@ -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;  | 
                                                        
@@ -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 DatabaseBase  | 
                                                        
| 123 | 123 | */  | 
                                                        
| 124 | 124 |  	public function selectNamedDB( $name, $db, $groups ) { | 
                                                        
@@ -552,7 +552,7 @@ discard block  | 
                                                    ||
| 552 | 552 | |
| 553 | 553 | /**  | 
                                                        
| 554 | 554 | * @param string $hash  | 
                                                        
| 555 | - * @return bool  | 
                                                        |
| 555 | + * @return integer  | 
                                                        |
| 556 | 556 | */  | 
                                                        
| 557 | 557 |  	public function validateSha1Hash( $hash ) { | 
                                                        
| 558 | 558 |  		return preg_match( '/^[a-f0-9]{40}$/', $hash ); | 
                                                        
@@ -560,7 +560,7 @@ discard block  | 
                                                    ||
| 560 | 560 | |
| 561 | 561 | /**  | 
                                                        
| 562 | 562 | * @param string $hash  | 
                                                        
| 563 | - * @return bool  | 
                                                        |
| 563 | + * @return integer  | 
                                                        |
| 564 | 564 | */  | 
                                                        
| 565 | 565 |  	public function validateSha1Base36Hash( $hash ) { | 
                                                        
| 566 | 566 |  		return preg_match( '/^[a-z0-9]{31}$/', $hash ); | 
                                                        
@@ -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;  |