@@ -30,6 +30,9 @@ |
||
30 | 30 | } |
31 | 31 | } |
32 | 32 | |
33 | + /** |
|
34 | + * @param string $name |
|
35 | + */ |
|
33 | 36 | function __call( $name, array $arguments ) { |
34 | 37 | if ( $this->conn === null ) { |
35 | 38 | list( $db, $groups, $wiki ) = $this->params; |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * @param array $data Array of *non*-urlencoded key => value pairs, the |
40 | 40 | * fake GET/POST values |
41 | 41 | * @param bool $wasPosted Whether to treat the data as POST |
42 | - * @param MediaWiki\Session\Session|array|null $session Session, session |
|
42 | + * @param MediaWiki\Session\Session|null $session Session, session |
|
43 | 43 | * data array, or null |
44 | 44 | * @param string $protocol 'http' or 'https' |
45 | 45 | * @throws MWException |
@@ -126,7 +126,6 @@ discard block |
||
126 | 126 | |
127 | 127 | /** |
128 | 128 | * @since 1.26 |
129 | - * @param string $name Unprefixed name of the cookie to set |
|
130 | 129 | * @param string|null $value Value of the cookie to set |
131 | 130 | * @param string|null $prefix Cookie prefix. Defaults to $wgCookiePrefix |
132 | 131 | */ |
@@ -152,6 +151,7 @@ discard block |
||
152 | 151 | |
153 | 152 | /** |
154 | 153 | * @since 1.25 |
154 | + * @param string $url |
|
155 | 155 | */ |
156 | 156 | public function setRequestURL( $url ) { |
157 | 157 | $this->requestUrl = $url; |
@@ -483,6 +483,9 @@ |
||
483 | 483 | return Html::element( 'input', $realAttrs ); |
484 | 484 | } |
485 | 485 | |
486 | + /** |
|
487 | + * @param string $mode |
|
488 | + */ |
|
486 | 489 | function makeSearchButton( $mode, $attrs = array() ) { |
487 | 490 | switch ( $mode ) { |
488 | 491 | case 'go': |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | * |
360 | 360 | * @param Config $baseConfig |
361 | 361 | * |
362 | - * @return Config The config to use during installation. |
|
362 | + * @return null|Config The config to use during installation. |
|
363 | 363 | */ |
364 | 364 | public static function getInstallerConfig( Config $baseConfig ) { |
365 | 365 | $configOverrides = new HashConfig(); |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | * fake password in which case leave it as it is. |
612 | 612 | * |
613 | 613 | * @param string $name |
614 | - * @param mixed $value |
|
614 | + * @param string $value |
|
615 | 615 | */ |
616 | 616 | public function setPassword( $name, $value ) { |
617 | 617 | if ( !preg_match( '/^\*+$/', $value ) ) { |
@@ -1256,7 +1256,7 @@ discard block |
||
1256 | 1256 | * |
1257 | 1257 | * If $versionInfo is not false, only executables with a version |
1258 | 1258 | * matching $versionInfo[1] will be returned. |
1259 | - * @return bool|string |
|
1259 | + * @return string|false |
|
1260 | 1260 | */ |
1261 | 1261 | public static function locateExecutable( $path, $names, $versionInfo = false ) { |
1262 | 1262 | if ( !is_array( $names ) ) { |
@@ -1288,14 +1288,14 @@ discard block |
||
1288 | 1288 | /** |
1289 | 1289 | * Same as locateExecutable(), but checks in getPossibleBinPaths() by default |
1290 | 1290 | * @see locateExecutable() |
1291 | - * @param array $names Array of possible names. |
|
1292 | - * @param array|bool $versionInfo Default: false or array with two members: |
|
1291 | + * @param string[] $names Array of possible names. |
|
1292 | + * @param string[] $versionInfo Default: false or array with two members: |
|
1293 | 1293 | * 0 => Command to run for version check, with $1 for the full executable name |
1294 | 1294 | * 1 => String to compare the output with |
1295 | 1295 | * |
1296 | 1296 | * If $versionInfo is not false, only executables with a version |
1297 | 1297 | * matching $versionInfo[1] will be returned. |
1298 | - * @return bool|string |
|
1298 | + * @return string|false |
|
1299 | 1299 | */ |
1300 | 1300 | public static function locateExecutableInDefaultPaths( $names, $versionInfo = false ) { |
1301 | 1301 | foreach ( self::getPossibleBinPaths() as $path ) { |
@@ -1314,7 +1314,7 @@ discard block |
||
1314 | 1314 | * Used only by environment checks. |
1315 | 1315 | * @param string $dir |
1316 | 1316 | * @param string $url |
1317 | - * @return bool|int|string |
|
1317 | + * @return string|false |
|
1318 | 1318 | */ |
1319 | 1319 | public function dirIsExecutable( $dir, $url ) { |
1320 | 1320 | $scriptTypes = [ |
@@ -183,7 +183,7 @@ |
||
183 | 183 | * given $bootstrapConfig. In particular, all wiring files defined in the |
184 | 184 | * ServiceWiringFiles setting are loaded, and the MediaWikiServices hook is called. |
185 | 185 | * |
186 | - * @param Config|null $bootstrapConfig The Config object to be registered as the |
|
186 | + * @param Config $bootstrapConfig The Config object to be registered as the |
|
187 | 187 | * 'BootstrapConfig' service. This has to contain at least the information |
188 | 188 | * needed to set up the 'ConfigFactory' service. If not provided, any call |
189 | 189 | * to getBootstrapConfig(), getConfigFactory, or getMainConfig will fail. |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | /** |
219 | 219 | * Show the main upload form |
220 | 220 | * |
221 | - * @param HTMLForm|string $form An HTMLForm instance or HTML string to show |
|
221 | + * @param UploadForm $form An HTMLForm instance or HTML string to show |
|
222 | 222 | */ |
223 | 223 | protected function showUploadForm( $form ) { |
224 | 224 | # Add links if file was previously deleted |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | * |
602 | 602 | * Note that the page target can be changed *on the form*, so our check |
603 | 603 | * state can get out of sync. |
604 | - * @return bool|string |
|
604 | + * @return boolean |
|
605 | 605 | */ |
606 | 606 | protected function getWatchCheck() { |
607 | 607 | if ( $this->getUser()->getOption( 'watchdefault' ) ) { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | * Most subclasses will want to call assertRepoDefined() here. |
161 | 161 | * |
162 | 162 | * @param Title|string|bool $title |
163 | - * @param FileRepo|bool $repo |
|
163 | + * @param FileRepo $repo |
|
164 | 164 | */ |
165 | 165 | function __construct( $title, $repo ) { |
166 | 166 | // Some subclasses do not use $title, but set name/title some other way |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | * Most callers don't check the return value, but ForeignAPIFile::getPath |
412 | 412 | * returns false. |
413 | 413 | * |
414 | - * @return string|bool ForeignAPIFile::getPath can return false |
|
414 | + * @return string ForeignAPIFile::getPath can return false |
|
415 | 415 | */ |
416 | 416 | public function getPath() { |
417 | 417 | if ( !isset( $this->path ) ) { |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | * Overridden by LocalFile, UnregisteredLocalFile |
458 | 458 | * |
459 | 459 | * @param int $page |
460 | - * @return int|bool |
|
460 | + * @return boolean |
|
461 | 461 | */ |
462 | 462 | public function getWidth( $page = 1 ) { |
463 | 463 | return false; |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | * Overridden by LocalFile, UnregisteredLocalFile |
472 | 472 | * |
473 | 473 | * @param int $page |
474 | - * @return bool|int False on failure |
|
474 | + * @return boolean False on failure |
|
475 | 475 | */ |
476 | 476 | public function getHeight( $page = 1 ) { |
477 | 477 | return false; |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | * |
485 | 485 | * @param int $desiredWidth |
486 | 486 | * @param int $page |
487 | - * @return bool|int |
|
487 | + * @return integer |
|
488 | 488 | */ |
489 | 489 | public function getThumbnailBucket( $desiredWidth, $page = 1 ) { |
490 | 490 | global $wgThumbnailBuckets, $wgThumbnailMinimumBucketDistance; |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | * Get handler-specific metadata |
634 | 634 | * Overridden by LocalFile, UnregisteredLocalFile |
635 | 635 | * STUB |
636 | - * @return bool|array |
|
636 | + * @return boolean |
|
637 | 637 | */ |
638 | 638 | public function getMetadata() { |
639 | 639 | return false; |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | /** |
643 | 643 | * Like getMetadata but returns a handler independent array of common values. |
644 | 644 | * @see MediaHandler::getCommonMetaArray() |
645 | - * @return array|bool Array or false if not supported |
|
645 | + * @return boolean Array or false if not supported |
|
646 | 646 | * @since 1.23 |
647 | 647 | */ |
648 | 648 | public function getCommonMetaArray() { |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | * |
661 | 661 | * @param array|string $metadata Array or string of (serialized) metadata |
662 | 662 | * @param int $version Version number. |
663 | - * @return array Array containing metadata, or what was passed to it on fail |
|
663 | + * @return ApiResult Array containing metadata, or what was passed to it on fail |
|
664 | 664 | * (unserializing if not array) |
665 | 665 | */ |
666 | 666 | public function convertMetadataVersion( $metadata, $version ) { |
@@ -1359,7 +1359,7 @@ discard block |
||
1359 | 1359 | /** |
1360 | 1360 | * Get a MediaHandler instance for this file |
1361 | 1361 | * |
1362 | - * @return MediaHandler|bool Registered MediaHandler for file's MIME type |
|
1362 | + * @return MediaHandler Registered MediaHandler for file's MIME type |
|
1363 | 1363 | * or false if none found |
1364 | 1364 | */ |
1365 | 1365 | function getHandler() { |
@@ -1782,7 +1782,7 @@ discard block |
||
1782 | 1782 | * @param bool $watch |
1783 | 1783 | * @param string|bool $timestamp |
1784 | 1784 | * @param null|User $user User object or null to use $wgUser |
1785 | - * @return bool |
|
1785 | + * @return boolean|null |
|
1786 | 1786 | * @throws MWException |
1787 | 1787 | */ |
1788 | 1788 | function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', |
@@ -1817,7 +1817,7 @@ discard block |
||
1817 | 1817 | } |
1818 | 1818 | |
1819 | 1819 | /** |
1820 | - * @param bool|IContextSource $context Context to use (optional) |
|
1820 | + * @param IContextSource $context Context to use (optional) |
|
1821 | 1821 | * @return bool |
1822 | 1822 | */ |
1823 | 1823 | function formatMetadata( $context = false ) { |
@@ -1964,7 +1964,7 @@ discard block |
||
1964 | 1964 | * Returns the number of pages of a multipage document, or false for |
1965 | 1965 | * documents which aren't multipage documents |
1966 | 1966 | * |
1967 | - * @return bool|int |
|
1967 | + * @return string|boolean |
|
1968 | 1968 | */ |
1969 | 1969 | function pageCount() { |
1970 | 1970 | if ( !isset( $this->pageCount ) ) { |
@@ -2031,7 +2031,7 @@ discard block |
||
2031 | 2031 | /** |
2032 | 2032 | * Get the HTML text of the description page, if available |
2033 | 2033 | * |
2034 | - * @param bool|Language $lang Optional language to fetch description in |
|
2034 | + * @param Language $lang Optional language to fetch description in |
|
2035 | 2035 | * @return string |
2036 | 2036 | */ |
2037 | 2037 | function getDescriptionText( $lang = false ) { |
@@ -2103,7 +2103,7 @@ discard block |
||
2103 | 2103 | * Returns false if the file does not have a description page, or retrieving the timestamp |
2104 | 2104 | * would be expensive. |
2105 | 2105 | * @since 1.25 |
2106 | - * @return string|bool |
|
2106 | + * @return boolean |
|
2107 | 2107 | */ |
2108 | 2108 | public function getDescriptionTouched() { |
2109 | 2109 | return false; |
@@ -1356,7 +1356,7 @@ |
||
1356 | 1356 | * @since 1.18 |
1357 | 1357 | * |
1358 | 1358 | * @param string $key |
1359 | - * @param mixed $value |
|
1359 | + * @param string $value |
|
1360 | 1360 | */ |
1361 | 1361 | public function setExtraParam( $key, $value ) { |
1362 | 1362 | $this->extraParams[$key] = $value; |
@@ -1275,7 +1275,7 @@ discard block |
||
1275 | 1275 | * @param string|null $wikiId Id (as used by WikiMap) of the wiki to generate links to. |
1276 | 1276 | * For use with external changes. |
1277 | 1277 | * |
1278 | - * @return mixed|string |
|
1278 | + * @return string |
|
1279 | 1279 | */ |
1280 | 1280 | public static function formatComment( |
1281 | 1281 | $comment, $title = null, $local = false, $wikiId = null |
@@ -1803,7 +1803,7 @@ discard block |
||
1803 | 1803 | * Split a link trail, return the "inside" portion and the remainder of the trail |
1804 | 1804 | * as a two-element array |
1805 | 1805 | * @param string $trail |
1806 | - * @return array |
|
1806 | + * @return string[] |
|
1807 | 1807 | */ |
1808 | 1808 | static function splitTrail( $trail ) { |
1809 | 1809 | global $wgContLang; |