Completed
Branch master (66e075)
by
unknown
26:06
created
includes/resourceloader/ResourceLoaderModule.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * Get this module's name. This is set when the module is registered
88 88
 	 * with ResourceLoader::register()
89 89
 	 *
90
-	 * @return string|null Name (string) or null if no name was set
90
+	 * @return string Name (string) or null if no name was set
91 91
 	 */
92 92
 	public function getName() {
93 93
 		return $this->name;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 * MUST return either an only= URL or a non-load.php URL.
210 210
 	 *
211 211
 	 * @param ResourceLoaderContext $context
212
-	 * @return array Array of URLs
212
+	 * @return string[] Array of URLs
213 213
 	 */
214 214
 	public function getScriptURLsForDebug( ResourceLoaderContext $context ) {
215 215
 		$resourceLoader = $context->getResourceLoader();
Please login to merge, or discard this patch.
includes/Sanitizer.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 	 *   replacements in HTML attribute values
450 450
 	 * @param array|bool $args Arguments for the processing callback
451 451
 	 * @param array $extratags For any extra tags to include
452
-	 * @param array $removetags For any tags (default or extra) to exclude
452
+	 * @param string[] $removetags For any tags (default or extra) to exclude
453 453
 	 * @return string
454 454
 	 */
455 455
 	public static function removeHTMLtags( $text, $processCallback = null,
@@ -1171,7 +1171,7 @@  discard block
 block discarded – undo
1171 1171
 	 * @since 1.27
1172 1172
 	 *
1173 1173
 	 * @param string $referenceString Space delimited list of ids
1174
-	 * @param string|array $options String or array of strings (default is array()):
1174
+	 * @param string $options String or array of strings (default is array()):
1175 1175
 	 *   'noninitial': This is a non-initial fragment of an id, not a full id,
1176 1176
 	 *       so don't pay attention if the first character isn't valid at the
1177 1177
 	 *       beginning of an id.  Only matters if $wgExperimentalHtmlIds is
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 	 * character references are decoded to UTF-8 text.
1247 1247
 	 *
1248 1248
 	 * @param string $text
1249
-	 * @return array
1249
+	 * @return callable
1250 1250
 	 */
1251 1251
 	public static function decodeTagAttributes( $text ) {
1252 1252
 		if ( trim( $text ) == '' ) {
@@ -1299,7 +1299,7 @@  discard block
 block discarded – undo
1299 1299
 	 * Pick the appropriate attribute value from a match set from the
1300 1300
 	 * attribs regex matches.
1301 1301
 	 *
1302
-	 * @param array $set
1302
+	 * @param string[] $set
1303 1303
 	 * @throws MWException When tag conditions are not met.
1304 1304
 	 * @return string
1305 1305
 	 */
@@ -1819,7 +1819,7 @@  discard block
 block discarded – undo
1819 1819
 
1820 1820
 	/**
1821 1821
 	 * @param string $url
1822
-	 * @return mixed|string
1822
+	 * @return string
1823 1823
 	 */
1824 1824
 	static function cleanUrl( $url ) {
1825 1825
 		# Normalize any HTML entities in input. They will be
@@ -1905,7 +1905,7 @@  discard block
 block discarded – undo
1905 1905
 	 * @since 1.18
1906 1906
 	 *
1907 1907
 	 * @param string $addr E-mail address
1908
-	 * @return bool
1908
+	 * @return null|boolean
1909 1909
 	 */
1910 1910
 	public static function validateEmail( $addr ) {
1911 1911
 		$result = null;
Please login to merge, or discard this patch.
includes/search/SearchSuggestion.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@
 block discarded – undo
55 55
 	/**
56 56
 	 * Construct a new suggestion
57 57
 	 * @param float $score the suggestion score
58
-	 * @param string $text|null the suggestion text
59 58
 	 * @param Title|null $suggestedTitle the suggested title
60 59
 	 * @param int|null $suggestedTitleID the suggested title ID
60
+	 * @param string $text
61 61
 	 */
62 62
 	public function __construct( $score, $text = null, Title $suggestedTitle = null,
63 63
 			$suggestedTitleID = null ) {
Please login to merge, or discard this patch.
includes/Title.php 1 patch
Doc Comments   +13 added lines, -14 removed lines patch added patch discarded remove patch
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 	 * objects or LinkCache entries. Uses $wgContentHandlerUseDB to determine
384 384
 	 * whether to include page_content_model.
385 385
 	 *
386
-	 * @return array
386
+	 * @return string[]
387 387
 	 */
388 388
 	protected static function getSelectFields() {
389 389
 		global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 	 * Get the prefixed DB key associated with an ID
628 628
 	 *
629 629
 	 * @param int $id The page_id of the article
630
-	 * @return Title|null An object representing the article, or null if no such article was found
630
+	 * @return null|string An object representing the article, or null if no such article was found
631 631
 	 */
632 632
 	public static function nameOf( $id ) {
633 633
 		$dbr = wfGetDB( DB_SLAVE );
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
 	 * (e.g. TitleValues cannot represent page-local links that have a
914 914
 	 * fragment but no title text).
915 915
 	 *
916
-	 * @return TitleValue|null
916
+	 * @return TitleValue
917 917
 	 */
918 918
 	public function getTitleValue() {
919 919
 		if ( $this->mTitleValue === null ) {
@@ -1144,7 +1144,6 @@  discard block
 block discarded – undo
1144 1144
 	/**
1145 1145
 	 * Returns true if the title is inside one of the specified namespaces.
1146 1146
 	 *
1147
-	 * @param int $namespaces,... The namespaces to check for
1148 1147
 	 * @return bool
1149 1148
 	 * @since 1.19
1150 1149
 	 */
@@ -1935,7 +1934,7 @@  discard block
 block discarded – undo
1935 1934
 	 *   - quick  : does cheap permission checks from slaves (usable for GUI creation)
1936 1935
 	 *   - full   : does cheap and expensive checks possibly from a slave
1937 1936
 	 *   - secure : does cheap and expensive checks, using the master as needed
1938
-	 * @param array $ignoreErrors Array of Strings Set this to a list of message keys
1937
+	 * @param string[] $ignoreErrors Array of Strings Set this to a list of message keys
1939 1938
 	 *   whose corresponding errors may be ignored.
1940 1939
 	 * @return array Array of arrays of the arguments to wfMessage to explain permissions problems.
1941 1940
 	 */
@@ -2036,7 +2035,7 @@  discard block
 block discarded – undo
2036 2035
 	 * Add the resulting error code to the errors array
2037 2036
 	 *
2038 2037
 	 * @param array $errors List of current errors
2039
-	 * @param array $result Result of errors
2038
+	 * @param string $result Result of errors
2040 2039
 	 *
2041 2040
 	 * @return array List of errors
2042 2041
 	 */
@@ -2427,7 +2426,7 @@  discard block
 block discarded – undo
2427 2426
 	 *
2428 2427
 	 * @param string $action The action to check
2429 2428
 	 * @param bool $short Short circuit on first error
2430
-	 * @return array List of errors
2429
+	 * @return string[] List of errors
2431 2430
 	 */
2432 2431
 	private function missingPermissionError( $action, $short ) {
2433 2432
 		// We avoid expensive display logic for quickUserCan's and such
@@ -3949,7 +3948,7 @@  discard block
 block discarded – undo
3949 3948
 	 *
3950 3949
 	 * @param int $revId Revision ID. Get the revision that was before this one.
3951 3950
 	 * @param int $flags Title::GAID_FOR_UPDATE
3952
-	 * @return int|bool Old revision ID, or false if none exists
3951
+	 * @return integer Old revision ID, or false if none exists
3953 3952
 	 */
3954 3953
 	public function getPreviousRevisionID( $revId, $flags = 0 ) {
3955 3954
 		$db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
@@ -4089,8 +4088,8 @@  discard block
 block discarded – undo
4089 4088
 	 * Get the number of revisions between the given revision.
4090 4089
 	 * Used for diffs and other things that really need it.
4091 4090
 	 *
4092
-	 * @param int|Revision $old Old revision or rev ID (first before range)
4093
-	 * @param int|Revision $new New revision or rev ID (first after range)
4091
+	 * @param Revision $old Old revision or rev ID (first before range)
4092
+	 * @param Revision $new New revision or rev ID (first after range)
4094 4093
 	 * @param int|null $max Limit of Revisions to count, will be incremented to detect truncations
4095 4094
 	 * @return int Number of revisions between these revisions.
4096 4095
 	 */
@@ -4202,9 +4201,9 @@  discard block
 block discarded – undo
4202 4201
 	 * Used for diffs and other things that really need it.
4203 4202
 	 *
4204 4203
 	 * @param int|Revision $old Old revision or rev ID (first before range by default)
4205
-	 * @param int|Revision $new New revision or rev ID (first after range by default)
4204
+	 * @param Revision $new New revision or rev ID (first after range by default)
4206 4205
 	 * @param int $limit Maximum number of authors
4207
-	 * @param string|array $options (Optional): Single option, or an array of options:
4206
+	 * @param string $options (Optional): Single option, or an array of options:
4208 4207
 	 *     'include_old' Include $old in the range; $new is excluded.
4209 4208
 	 *     'include_new' Include $new in the range; $old is excluded.
4210 4209
 	 *     'include_both' Include both $old and $new in the range.
@@ -4360,7 +4359,7 @@  discard block
 block discarded – undo
4360 4359
 	/**
4361 4360
 	 * Get the default message text or false if the message doesn't exist
4362 4361
 	 *
4363
-	 * @return string|bool
4362
+	 * @return false|string
4364 4363
 	 */
4365 4364
 	public function getDefaultMessageText() {
4366 4365
 		global $wgContLang;
@@ -4798,7 +4797,7 @@  discard block
 block discarded – undo
4798 4797
 	}
4799 4798
 
4800 4799
 	/**
4801
-	 * @return array
4800
+	 * @return string[]
4802 4801
 	 */
4803 4802
 	public function __sleep() {
4804 4803
 		return [
Please login to merge, or discard this patch.
includes/WebRequest.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 	 * This is for use prior to Setup.php, when no WebRequest object is available.
224 224
 	 * At other times, use the non-static function getProtocol().
225 225
 	 *
226
-	 * @return array
226
+	 * @return string
227 227
 	 */
228 228
 	public static function detectProtocol() {
229 229
 		if ( ( !empty( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' ) ||
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 	 * Set an arbitrary value into our get/post data.
382 382
 	 *
383 383
 	 * @param string $key Key name to use
384
-	 * @param mixed $value Value to set
384
+	 * @param string $value Value to set
385 385
 	 * @return mixed Old value if one was present, null otherwise
386 386
 	 */
387 387
 	public function setVal( $key, $value ) {
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 	/**
570 570
 	 * Returns the names of all input values excluding those in $exclude.
571 571
 	 *
572
-	 * @param array $exclude
572
+	 * @param string[] $exclude
573 573
 	 * @return array
574 574
 	 */
575 575
 	public function getValueNames( $exclude = [] ) {
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 	 * @param string $key The name of the cookie
699 699
 	 * @param string $prefix A prefix to use for the cookie name, if not $wgCookiePrefix
700 700
 	 * @param mixed $default What to return if the value isn't found
701
-	 * @return mixed Cookie value or $default if the cookie not set
701
+	 * @return string Cookie value or $default if the cookie not set
702 702
 	 */
703 703
 	public function getCookie( $key, $prefix = null, $default = null ) {
704 704
 		if ( $prefix === null ) {
Please login to merge, or discard this patch.
includes/MagicWordArray.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
 
772 772
 	/**
773 773
 	 * Get the base regex
774
-	 * @return array
774
+	 * @return string[]
775 775
 	 */
776 776
 	function getBaseRegex() {
777 777
 		if ( is_null( $this->baseRegex ) ) {
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
 	/**
816 816
 	 * Get a regex for matching variables with parameters
817 817
 	 *
818
-	 * @return string
818
+	 * @return string[]
819 819
 	 */
820 820
 	function getVariableRegex() {
821 821
 		return str_replace( "\\$1", "(.*?)", $this->getRegex() );
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 	 * Returns array(magic word ID, parameter value)
869 869
 	 * If there is no parameter value, that element will be false.
870 870
 	 *
871
-	 * @param array $m
871
+	 * @param string[] $m
872 872
 	 *
873 873
 	 * @throws MWException
874 874
 	 * @return array
Please login to merge, or discard this patch.
includes/logging/PatrolLog.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 	/**
31 31
 	 * Record a log event for a change being patrolled
32 32
 	 *
33
-	 * @param int|RecentChange $rc Change identifier or RecentChange object
33
+	 * @param RecentChange $rc Change identifier or RecentChange object
34 34
 	 * @param bool $auto Was this patrol event automatic?
35 35
 	 * @param User $user User performing the action or null to use $wgUser
36 36
 	 * @param string|string[] $tags Change tags to add to the patrol log entry
Please login to merge, or discard this patch.
maintenance/findHooks.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@
 block discarded – undo
296 296
 	/**
297 297
 	 * Get hooks from a directory of PHP files.
298 298
 	 * @param string $dir Directory path to start at
299
-	 * @param int $recursive Pass self::FIND_RECURSIVE
299
+	 * @param int $recurse Pass self::FIND_RECURSIVE
300 300
 	 * @return array Array: key => hook name; value => array of arguments or string 'unknown'
301 301
 	 */
302 302
 	private function getHooksFromDir( $dir, $recurse = 0 ) {
Please login to merge, or discard this patch.
includes/db/DatabaseMysqlBase.php 1 patch
Doc Comments   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 
229 229
 	/**
230 230
 	 * @param ResultWrapper|resource $res
231
-	 * @return stdClass|bool
231
+	 * @return stdClass
232 232
 	 * @throws DBUnexpectedError
233 233
 	 */
234 234
 	function fetchObject( $res ) {
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	/**
364 364
 	 * Get the name of the specified field in a result
365 365
 	 *
366
-	 * @param ResultWrapper|resource $res
366
+	 * @param resource $res
367 367
 	 * @param int $n
368 368
 	 * @return string
369 369
 	 */
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 	/**
387 387
 	 * Get the type of the specified field in a result
388 388
 	 *
389
-	 * @param ResultWrapper|resource $res
389
+	 * @param resource $res
390 390
 	 * @param int $n
391 391
 	 * @return string
392 392
 	 */
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 	/**
409 409
 	 * Move internal result pointer
410 410
 	 *
411
-	 * @param ResultWrapper|resource $res
411
+	 * @param resource $res
412 412
 	 * @param int $row
413 413
 	 * @return bool
414 414
 	 */
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
 	/**
803 803
 	 * Get the position of the master from SHOW SLAVE STATUS
804 804
 	 *
805
-	 * @return MySQLMasterPos|bool
805
+	 * @return DBMasterPos
806 806
 	 */
807 807
 	function getSlavePos() {
808 808
 		$res = $this->query( 'SHOW SLAVE STATUS', 'DatabaseBase::getSlavePos' );
@@ -966,6 +966,9 @@  discard block
 block discarded – undo
966 966
 		return false;
967 967
 	}
968 968
 
969
+	/**
970
+	 * @param string $lockName
971
+	 */
969 972
 	private function makeLockName( $lockName ) {
970 973
 		// http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock
971 974
 		// Newer version enforce a 64 char length limit.
@@ -1321,6 +1324,9 @@  discard block
 block discarded – undo
1321 1324
 		$is_pk, $is_unique, $is_multiple, $is_key, $type, $binary,
1322 1325
 		$is_numeric, $is_blob, $is_unsigned, $is_zerofill;
1323 1326
 
1327
+	/**
1328
+	 * @param stdClass $info
1329
+	 */
1324 1330
 	function __construct( $info ) {
1325 1331
 		$this->name = $info->name;
1326 1332
 		$this->tablename = $info->table;
@@ -1467,7 +1473,7 @@  discard block
 block discarded – undo
1467 1473
 	}
1468 1474
 
1469 1475
 	/**
1470
-	 * @return string|bool
1476
+	 * @return string|false
1471 1477
 	 */
1472 1478
 	protected function getBinlogName() {
1473 1479
 		$m = [];
Please login to merge, or discard this patch.