Completed
Branch master (715cbe)
by
unknown
51:55
created
includes/parser/Parser.php 1 patch
Doc Comments   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 	 * @since 1.25
616 616
 	 *
617 617
 	 * @param string $text Text extension wants to have parsed
618
-	 * @param bool|PPFrame $frame The frame to use for expanding any template variables
618
+	 * @param PPFrame $frame The frame to use for expanding any template variables
619 619
 	 * @return string Fully parsed HTML
620 620
 	 */
621 621
 	public function recursiveTagParseFully( $text, $frame = false ) {
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
 	 * @param ParserOptions $options
634 634
 	 * @param int|null $revid
635 635
 	 * @param bool|PPFrame $frame
636
-	 * @return mixed|string
636
+	 * @return string
637 637
 	 */
638 638
 	public function preprocess( $text, Title $title = null,
639 639
 		ParserOptions $options, $revid = null, $frame = false
@@ -1969,6 +1969,10 @@  discard block
 block discarded – undo
1969 1969
 		return $ret;
1970 1970
 	}
1971 1971
 
1972
+	/**
1973
+	 * @param string $component
1974
+	 * @param string $unsafe
1975
+	 */
1972 1976
 	private static function normalizeUrlComponent( $component, $unsafe ) {
1973 1977
 		$callback = function ( $matches ) use ( $unsafe ) {
1974 1978
 			$char = urldecode( $matches[0] );
@@ -2420,6 +2424,7 @@  discard block
 block discarded – undo
2420 2424
 	 *
2421 2425
 	 * @param string $target The source of the link
2422 2426
 	 * @param string &$text The link text, modified as necessary
2427
+	 * @param string $text
2423 2428
 	 * @return string The full name of the link
2424 2429
 	 * @private
2425 2430
 	 */
@@ -2445,7 +2450,7 @@  discard block
 block discarded – undo
2445 2450
 	 * @private
2446 2451
 	 *
2447 2452
 	 * @param int $index
2448
-	 * @param bool|PPFrame $frame
2453
+	 * @param PPFrame $frame
2449 2454
 	 *
2450 2455
 	 * @throws MWException
2451 2456
 	 * @return string
@@ -2842,7 +2847,7 @@  discard block
 block discarded – undo
2842 2847
 	 *
2843 2848
 	 * @param string $s
2844 2849
 	 *
2845
-	 * @return array
2850
+	 * @return string[]
2846 2851
 	 */
2847 2852
 	public static function splitWhitespace( $s ) {
2848 2853
 		$ltrimmed = ltrim( $s );
@@ -2950,7 +2955,7 @@  discard block
 block discarded – undo
2950 2955
 	 *   'expansion-depth-exceeded' (corresponding messages:
2951 2956
 	 *       'expansion-depth-exceeded-warning',
2952 2957
 	 *       'expansion-depth-exceeded-category')
2953
-	 * @param string|int|null $current Current value
2958
+	 * @param integer $current Current value
2954 2959
 	 * @param string|int|null $max Maximum allowed, when an explicit limit has been
2955 2960
 	 *	 exceeded, provide the values (optional)
2956 2961
 	 */
@@ -3954,7 +3959,7 @@  discard block
 block discarded – undo
3954 3959
 	 * @param string $text
3955 3960
 	 * @param string $origText Original, untouched wikitext
3956 3961
 	 * @param bool $isMain
3957
-	 * @return mixed|string
3962
+	 * @return string
3958 3963
 	 * @private
3959 3964
 	 */
3960 3965
 	public function formatHeadings( $text, $origText, $isMain = true ) {
@@ -4525,7 +4530,7 @@  discard block
 block discarded – undo
4525 4530
 	 * Check that the user's signature contains no bad XML
4526 4531
 	 *
4527 4532
 	 * @param string $text
4528
-	 * @return string|bool An expanded string, or false if invalid.
4533
+	 * @return string|false An expanded string, or false if invalid.
4529 4534
 	 */
4530 4535
 	public function validateSig( $text ) {
4531 4536
 		return Xml::isWellFormedXmlFragment( $text ) ? $text : false;
@@ -5067,7 +5072,7 @@  discard block
 block discarded – undo
5067 5072
 	 *
5068 5073
 	 * @param Title $title
5069 5074
 	 * @param string $options
5070
-	 * @param LinkHolderArray|bool $holders
5075
+	 * @param LinkHolderArray $holders
5071 5076
 	 * @return string HTML
5072 5077
 	 */
5073 5078
 	public function makeImage( $title, $options, $holders = false ) {
@@ -5283,7 +5288,7 @@  discard block
 block discarded – undo
5283 5288
 	/**
5284 5289
 	 * @param string $caption
5285 5290
 	 * @param LinkHolderArray|bool $holders
5286
-	 * @return mixed|string
5291
+	 * @return string
5287 5292
 	 */
5288 5293
 	protected function stripAltText( $caption, $holders ) {
5289 5294
 		# Strip bad stuff out of the title (tooltip).  We can't just use
@@ -5686,7 +5691,7 @@  discard block
 block discarded – undo
5686 5691
 	 * Accessor for $mDefaultSort
5687 5692
 	 * Unlike getDefaultSort(), will return false if none is set
5688 5693
 	 *
5689
-	 * @return string|bool
5694
+	 * @return false|string
5690 5695
 	 */
5691 5696
 	public function getCustomDefaultSort() {
5692 5697
 		return $this->mDefaultSort;
Please login to merge, or discard this patch.
includes/parser/Preprocessor_DOM.php 1 patch
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1311,7 +1311,6 @@  discard block
 block discarded – undo
1311 1311
 	/**
1312 1312
 	 * @param string $sep
1313 1313
 	 * @param int $flags
1314
-	 * @param string|PPNode_DOM|DOMDocument $args,...
1315 1314
 	 * @return string
1316 1315
 	 */
1317 1316
 	public function implodeWithFlags( $sep, $flags /*, ... */ ) {
@@ -1343,7 +1342,6 @@  discard block
 block discarded – undo
1343 1342
 	 * This previously called implodeWithFlags but has now been inlined to reduce stack depth
1344 1343
 	 *
1345 1344
 	 * @param string $sep
1346
-	 * @param string|PPNode_DOM|DOMDocument $args,...
1347 1345
 	 * @return string
1348 1346
 	 */
1349 1347
 	public function implode( $sep /*, ... */ ) {
@@ -1375,7 +1373,6 @@  discard block
 block discarded – undo
1375 1373
 	 * with implode()
1376 1374
 	 *
1377 1375
 	 * @param string $sep
1378
-	 * @param string|PPNode_DOM|DOMDocument $args,...
1379 1376
 	 * @return array
1380 1377
 	 */
1381 1378
 	public function virtualImplode( $sep /*, ... */ ) {
@@ -1407,7 +1404,6 @@  discard block
 block discarded – undo
1407 1404
 	 * @param string $start
1408 1405
 	 * @param string $sep
1409 1406
 	 * @param string $end
1410
-	 * @param string|PPNode_DOM|DOMDocument $args,...
1411 1407
 	 * @return array
1412 1408
 	 */
1413 1409
 	public function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
@@ -1570,7 +1566,7 @@  discard block
 block discarded – undo
1570 1566
 
1571 1567
 	/**
1572 1568
 	 * @param Preprocessor $preprocessor
1573
-	 * @param bool|PPFrame_DOM $parent
1569
+	 * @param PPFrame_DOM $parent
1574 1570
 	 * @param array $numberedArgs
1575 1571
 	 * @param array $namedArgs
1576 1572
 	 * @param bool|Title $title
@@ -1741,6 +1737,9 @@  discard block
 block discarded – undo
1741 1737
 
1742 1738
 	public $args;
1743 1739
 
1740
+	/**
1741
+	 * @param Preprocessor_DOM $preprocessor
1742
+	 */
1744 1743
 	public function __construct( $preprocessor, $args ) {
1745 1744
 		parent::__construct( $preprocessor );
1746 1745
 		$this->args = $args;
Please login to merge, or discard this patch.
includes/parser/Preprocessor_Hash.php 1 patch
Doc Comments   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -688,6 +688,9 @@  discard block
 block discarded – undo
688 688
 		return $rootNode;
689 689
 	}
690 690
 
691
+	/**
692
+	 * @param string $text
693
+	 */
691 694
 	private static function addLiteral( array &$accum, $text ) {
692 695
 		$n = count( $accum );
693 696
 		if ( $n && is_string( $accum[$n - 1] ) ) {
@@ -1133,7 +1136,6 @@  discard block
 block discarded – undo
1133 1136
 	/**
1134 1137
 	 * @param string $sep
1135 1138
 	 * @param int $flags
1136
-	 * @param string|PPNode $args,...
1137 1139
 	 * @return string
1138 1140
 	 */
1139 1141
 	public function implodeWithFlags( $sep, $flags /*, ... */ ) {
@@ -1164,7 +1166,6 @@  discard block
 block discarded – undo
1164 1166
 	 * Implode with no flags specified
1165 1167
 	 * This previously called implodeWithFlags but has now been inlined to reduce stack depth
1166 1168
 	 * @param string $sep
1167
-	 * @param string|PPNode $args,...
1168 1169
 	 * @return string
1169 1170
 	 */
1170 1171
 	public function implode( $sep /*, ... */ ) {
@@ -1196,7 +1197,6 @@  discard block
 block discarded – undo
1196 1197
 	 * with implode()
1197 1198
 	 *
1198 1199
 	 * @param string $sep
1199
-	 * @param string|PPNode $args,...
1200 1200
 	 * @return PPNode_Hash_Array
1201 1201
 	 */
1202 1202
 	public function virtualImplode( $sep /*, ... */ ) {
@@ -1229,7 +1229,6 @@  discard block
 block discarded – undo
1229 1229
 	 * @param string $start
1230 1230
 	 * @param string $sep
1231 1231
 	 * @param string $end
1232
-	 * @param string|PPNode $args,...
1233 1232
 	 * @return PPNode_Hash_Array
1234 1233
 	 */
1235 1234
 	public function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
@@ -1392,7 +1391,7 @@  discard block
 block discarded – undo
1392 1391
 
1393 1392
 	/**
1394 1393
 	 * @param Preprocessor $preprocessor
1395
-	 * @param bool|PPFrame $parent
1394
+	 * @param PPFrame_Hash $parent
1396 1395
 	 * @param array $numberedArgs
1397 1396
 	 * @param array $namedArgs
1398 1397
 	 * @param bool|Title $title
@@ -1572,6 +1571,9 @@  discard block
 block discarded – undo
1572 1571
 
1573 1572
 	public $args;
1574 1573
 
1574
+	/**
1575
+	 * @param Preprocessor_Hash $preprocessor
1576
+	 */
1575 1577
 	public function __construct( $preprocessor, $args ) {
1576 1578
 		parent::__construct( $preprocessor );
1577 1579
 		$this->args = $args;
Please login to merge, or discard this patch.
includes/media/DjVuImage.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -92,6 +92,10 @@  discard block
 block discarded – undo
92 92
 		fclose( $file );
93 93
 	}
94 94
 
95
+	/**
96
+	 * @param resource $file
97
+	 * @param integer $indent
98
+	 */
95 99
 	private function dumpForm( $file, $length, $indent ) {
96 100
 		$start = ftell( $file );
97 101
 		$secondary = fread( $file, 4 );
@@ -165,6 +169,9 @@  discard block
 block discarded – undo
165 169
 		}
166 170
 	}
167 171
 
172
+	/**
173
+	 * @param integer $chunkLength
174
+	 */
168 175
 	private function skipChunk( $file, $chunkLength ) {
169 176
 		fseek( $file, $chunkLength, SEEK_CUR );
170 177
 
@@ -174,6 +181,9 @@  discard block
 block discarded – undo
174 181
 		}
175 182
 	}
176 183
 
184
+	/**
185
+	 * @param resource $file
186
+	 */
177 187
 	private function getMultiPageInfo( $file, $formLength ) {
178 188
 		// For now, we'll just look for the first page in the file
179 189
 		// and report its information, hoping others are the same size.
@@ -368,6 +378,9 @@  discard block
 block discarded – undo
368 378
 		return $xml;
369 379
 	}
370 380
 
381
+	/**
382
+	 * @param string $line
383
+	 */
371 384
 	function parseFormDjvu( $line, &$xml ) {
372 385
 		$parentLevel = strspn( $line, ' ' );
373 386
 		$line = strtok( "\n" );
Please login to merge, or discard this patch.
includes/resourceloader/ResourceLoaderClientHtml.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,6 @@
 block discarded – undo
104 104
 	 *
105 105
 	 * See OutputPage::buildExemptModules() for use cases.
106 106
 	 *
107
-	 * @param array $modules Module state keyed by module name
108 107
 	 */
109 108
 	public function setExemptStates( array $states ) {
110 109
 		$this->exemptStates = $states;
Please login to merge, or discard this patch.
includes/page/WikiPage.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * Return the list of revision fields that should be selected to create
258 258
 	 * a new page.
259 259
 	 *
260
-	 * @return array
260
+	 * @return string[]
261 261
 	 */
262 262
 	public static function selectFields() {
263 263
 		global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
 	 * @param IDatabase $dbw
1145 1145
 	 * @param int|null $pageId Custom page ID that will be used for the insert statement
1146 1146
 	 *
1147
-	 * @return bool|int The newly created page_id key; false if the row was not
1147
+	 * @return integer The newly created page_id key; false if the row was not
1148 1148
 	 *   inserted, e.g. because the title already existed or because the specified
1149 1149
 	 *   page ID is already in use.
1150 1150
 	 */
@@ -1491,7 +1491,7 @@  discard block
 block discarded – undo
1491 1491
 	 * error will be returned. These two conditions are also possible with
1492 1492
 	 * auto-detection due to MediaWiki's performance-optimised locking strategy.
1493 1493
 	 *
1494
-	 * @param bool|int $baseRevId The revision ID this edit was based off, if any.
1494
+	 * @param boolean $baseRevId The revision ID this edit was based off, if any.
1495 1495
 	 *   This is not the parent revision ID, rather the revision ID for older
1496 1496
 	 *   content used as the source for a rollback, for example.
1497 1497
 	 * @param User $user The user doing the edit
@@ -3370,7 +3370,7 @@  discard block
 block discarded – undo
3370 3370
 	 * Returns a list of categories this page is a member of.
3371 3371
 	 * Results will include hidden categories
3372 3372
 	 *
3373
-	 * @return TitleArray
3373
+	 * @return TitleArrayFromResult|null
3374 3374
 	 */
3375 3375
 	public function getCategories() {
3376 3376
 		$id = $this->getId();
@@ -3445,7 +3445,7 @@  discard block
 block discarded – undo
3445 3445
 	 * Auto-generates a deletion reason
3446 3446
 	 *
3447 3447
 	 * @param bool &$hasHistory Whether the page has a history
3448
-	 * @return string|bool String containing deletion reason or empty string, or boolean false
3448
+	 * @return false|string String containing deletion reason or empty string, or boolean false
3449 3449
 	 *    if no revision occurred
3450 3450
 	 */
3451 3451
 	public function getAutoDeleteReason( &$hasHistory ) {
Please login to merge, or discard this patch.
includes/resourceloader/ResourceLoader.php 1 patch
Doc Comments   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,6 +207,10 @@  discard block
 block discarded – undo
207 207
 		return $result;
208 208
 	}
209 209
 
210
+	/**
211
+	 * @param string $filter
212
+	 * @param string $data
213
+	 */
210 214
 	private static function applyFilter( $filter, $data ) {
211 215
 		$data = trim( $data );
212 216
 		if ( $data ) {
@@ -309,7 +313,7 @@  discard block
 block discarded – undo
309 313
 	 * @throws MWException If a duplicate module registration is attempted
310 314
 	 * @throws MWException If a module name contains illegal characters (pipes or commas)
311 315
 	 * @throws MWException If something other than a ResourceLoaderModule is being registered
312
-	 * @return bool False if there were any errors, in which case one or more modules were
316
+	 * @return boolean|null False if there were any errors, in which case one or more modules were
313 317
 	 *   not registered
314 318
 	 */
315 319
 	public function register( $name, $info = null ) {
@@ -573,7 +577,7 @@  discard block
 block discarded – undo
573 577
 	/**
574 578
 	 * Get the list of sources.
575 579
 	 *
576
-	 * @return array Like [ id => load.php url, ... ]
580
+	 * @return string Like [ id => load.php url, ... ]
577 581
 	 */
578 582
 	public function getSources() {
579 583
 		return $this->sources;
@@ -610,7 +614,7 @@  discard block
 block discarded – undo
610 614
 	 *
611 615
 	 * @since 1.26
612 616
 	 * @param ResourceLoaderContext $context
613
-	 * @param string[] $modules List of known module names
617
+	 * @param string[] $moduleNames List of known module names
614 618
 	 * @return string Hash
615 619
 	 */
616 620
 	public function getCombinedVersion( ResourceLoaderContext $context, array $moduleNames ) {
@@ -634,7 +638,6 @@  discard block
 block discarded – undo
634 638
 	 *
635 639
 	 * @since 1.28
636 640
 	 * @param ResourceLoaderContext $context
637
-	 * @param string[] $modules List of module names
638 641
 	 * @return string Hash
639 642
 	 */
640 643
 	public function getExpectedVersionQuery( ResourceLoaderContext $context ) {
Please login to merge, or discard this patch.
includes/page/ImagePage.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 	 *
297 297
 	 * Omit noarticletext if sharedupload; text will be fetched from the
298 298
 	 * shared upload server if possible.
299
-	 * @return string
299
+	 * @return null|Content
300 300
 	 */
301 301
 	public function getContentObject() {
302 302
 		$this->loadFile();
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 	 * Make the text under the image to say what size preview
638 638
 	 *
639 639
 	 * @param $params array parameters for thumbnail
640
-	 * @param $sizeLinkBigImagePreview HTML for the current size
640
+	 * @param string $sizeLinkBigImagePreview HTML for the current size
641 641
 	 * @return string HTML output
642 642
 	 */
643 643
 	private function getThumbPrevText( $params, $sizeLinkBigImagePreview ) {
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
 
1213 1213
 	/**
1214 1214
 	 * @see WikiFilePage::getFile
1215
-	 * @return bool|File
1215
+	 * @return string
1216 1216
 	 */
1217 1217
 	public function getFile() {
1218 1218
 		return $this->mPage->getFile();
Please login to merge, or discard this patch.
includes/MediaWiki.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -647,7 +647,7 @@
 block discarded – undo
647 647
 	/**
648 648
 	 * @param string $url
649 649
 	 * @param IContextSource $context
650
-	 * @return string|bool Either "local" or "remote" if in the farm, false otherwise
650
+	 * @return false|string Either "local" or "remote" if in the farm, false otherwise
651 651
 	 */
652 652
 	private function getUrlDomainDistance( $url, IContextSource $context ) {
653 653
 		static $relevantKeys = [ 'host' => true, 'port' => true ];
Please login to merge, or discard this patch.