@@ -356,6 +356,9 @@ discard block |
||
356 | 356 | return $this->mPreSaveTransform; |
357 | 357 | } |
358 | 358 | |
359 | + /** |
|
360 | + * @return string |
|
361 | + */ |
|
359 | 362 | public function getDateFormat() { |
360 | 363 | $this->optionUsed( 'dateformat' ); |
361 | 364 | if ( !isset( $this->mDateFormat ) ) { |
@@ -429,6 +432,9 @@ discard block |
||
429 | 432 | return wfSetVar( $this->mDateFormat, $x ); |
430 | 433 | } |
431 | 434 | |
435 | + /** |
|
436 | + * @param boolean $x |
|
437 | + */ |
|
432 | 438 | public function setEditSection( $x ) { |
433 | 439 | return wfSetVar( $this->mEditSection, $x ); |
434 | 440 | } |
@@ -445,6 +451,9 @@ discard block |
||
445 | 451 | return wfSetVar( $this->mTidy, $x ); |
446 | 452 | } |
447 | 453 | |
454 | + /** |
|
455 | + * @param boolean $x |
|
456 | + */ |
|
448 | 457 | public function setInterfaceMessage( $x ) { |
449 | 458 | return wfSetVar( $this->mInterfaceMessage, $x ); |
450 | 459 | } |
@@ -453,6 +462,9 @@ discard block |
||
453 | 462 | return wfSetVar( $this->mTargetLanguage, $x, true ); |
454 | 463 | } |
455 | 464 | |
465 | + /** |
|
466 | + * @param integer $x |
|
467 | + */ |
|
456 | 468 | public function setMaxIncludeSize( $x ) { |
457 | 469 | return wfSetVar( $this->mMaxIncludeSize, $x ); |
458 | 470 | } |
@@ -474,11 +486,18 @@ discard block |
||
474 | 486 | return wfSetVar( $this->mExpensiveParserFunctionLimit, $x ); |
475 | 487 | } |
476 | 488 | |
489 | + /** |
|
490 | + * @param boolean $x |
|
491 | + */ |
|
477 | 492 | public function setRemoveComments( $x ) { |
478 | 493 | return wfSetVar( $this->mRemoveComments, $x ); |
479 | 494 | } |
480 | 495 | |
481 | 496 | /* @since 1.24 */ |
497 | + |
|
498 | + /** |
|
499 | + * @param Closure $x |
|
500 | + */ |
|
482 | 501 | public function setCurrentRevisionCallback( $x ) { |
483 | 502 | return wfSetVar( $this->mCurrentRevisionCallback, $x ); |
484 | 503 | } |
@@ -491,6 +510,9 @@ discard block |
||
491 | 510 | return wfSetVar( $this->mEnableLimitReport, $x ); |
492 | 511 | } |
493 | 512 | |
513 | + /** |
|
514 | + * @param string|false $x |
|
515 | + */ |
|
494 | 516 | public function setTimestamp( $x ) { |
495 | 517 | return wfSetVar( $this->mTimestamp, $x ); |
496 | 518 | } |
@@ -531,6 +553,9 @@ discard block |
||
531 | 553 | return wfSetVar( $this->mPreSaveTransform, $x ); |
532 | 554 | } |
533 | 555 | |
556 | + /** |
|
557 | + * @param boolean $x |
|
558 | + */ |
|
534 | 559 | public function setIsPreview( $x ) { |
535 | 560 | return wfSetVar( $this->mIsPreview, $x ); |
536 | 561 | } |
@@ -539,6 +564,9 @@ discard block |
||
539 | 564 | return wfSetVar( $this->mIsSectionPreview, $x ); |
540 | 565 | } |
541 | 566 | |
567 | + /** |
|
568 | + * @param boolean $x |
|
569 | + */ |
|
542 | 570 | public function setIsPrintable( $x ) { |
543 | 571 | return wfSetVar( $this->mIsPrintable, $x ); |
544 | 572 | } |
@@ -723,7 +751,7 @@ discard block |
||
723 | 751 | * Returns the full array of options that would have been used by |
724 | 752 | * in 1.16. |
725 | 753 | * Used to get the old parser cache entries when available. |
726 | - * @return array |
|
754 | + * @return string[] |
|
727 | 755 | */ |
728 | 756 | public static function legacyOptions() { |
729 | 757 | return array( |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | * High times could be due to scanning, updates, locking, and such |
256 | 256 | * |
257 | 257 | * @param string $type IDatabase::ESTIMATE_* constant [default: ESTIMATE_ALL] |
258 | - * @return float|bool Returns false if not transaction is active |
|
258 | + * @return null|IDatabase Returns false if not transaction is active |
|
259 | 259 | * @since 1.26 |
260 | 260 | */ |
261 | 261 | public function pendingWriteQueryDuration( $type = self::ESTIMATE_TOTAL ); |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * Change the position of the cursor in a result object |
430 | 430 | * @see http://www.php.net/mysql_data_seek |
431 | 431 | * |
432 | - * @param mixed $res A SQL result |
|
432 | + * @param ResultWrapper $res A SQL result |
|
433 | 433 | * @param int $row |
434 | 434 | */ |
435 | 435 | public function dataSeek( $res, $row ); |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | * @param string|array $table Table name. See IDatabase::select() for details. |
560 | 560 | * @param string $var The field name to select. This must be a valid SQL |
561 | 561 | * fragment: do not use unvalidated user input. |
562 | - * @param string|array $cond The condition array. See IDatabase::select() for details. |
|
562 | + * @param string $cond The condition array. See IDatabase::select() for details. |
|
563 | 563 | * @param string $fname The function name of the caller. |
564 | 564 | * @param string|array $options The query options. See IDatabase::select() for details. |
565 | 565 | * |
@@ -577,10 +577,10 @@ discard block |
||
577 | 577 | * |
578 | 578 | * If no result rows are returned from the query, false is returned. |
579 | 579 | * |
580 | - * @param string|array $table Table name. See IDatabase::select() for details. |
|
580 | + * @param string $table Table name. See IDatabase::select() for details. |
|
581 | 581 | * @param string $var The field name to select. This must be a valid SQL |
582 | 582 | * fragment: do not use unvalidated user input. |
583 | - * @param string|array $cond The condition array. See IDatabase::select() for details. |
|
583 | + * @param string $cond The condition array. See IDatabase::select() for details. |
|
584 | 584 | * @param string $fname The function name of the caller. |
585 | 585 | * @param string|array $options The query options. See IDatabase::select() for details. |
586 | 586 | * |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | * |
598 | 598 | * @param string|array $table Table name |
599 | 599 | * @param string|array $vars Field names |
600 | - * @param string|array $conds Conditions |
|
600 | + * @param string $conds Conditions |
|
601 | 601 | * @param string $fname Caller function name |
602 | 602 | * @param array $options Query options |
603 | 603 | * @param array $join_conds Join conditions |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | * |
636 | 636 | * Untrusted user input must not be passed to this parameter. |
637 | 637 | * |
638 | - * @param string|array $conds |
|
638 | + * @param string $conds |
|
639 | 639 | * |
640 | 640 | * May be either a string containing a single condition, or an array of |
641 | 641 | * conditions. If an array is given, the conditions constructed from each |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | * |
754 | 754 | * @param string|array $table Table name |
755 | 755 | * @param string|array $vars Field names |
756 | - * @param string|array $conds Conditions |
|
756 | + * @param string $conds Conditions |
|
757 | 757 | * @param string $fname Caller function name |
758 | 758 | * @param string|array $options Query options |
759 | 759 | * @param string|array $join_conds Join conditions |
@@ -817,9 +817,9 @@ discard block |
||
817 | 817 | * |
818 | 818 | * @since 1.27 Added $join_conds parameter |
819 | 819 | * |
820 | - * @param array|string $tables Table names |
|
820 | + * @param string $tables Table names |
|
821 | 821 | * @param string $vars Unused |
822 | - * @param array|string $conds Filters on the table |
|
822 | + * @param string $conds Filters on the table |
|
823 | 823 | * @param string $fname Function name for profiling |
824 | 824 | * @param array $options Options for select |
825 | 825 | * @param array $join_conds Join conditions (since 1.27) |
@@ -1013,7 +1013,7 @@ discard block |
||
1013 | 1013 | * @param string $delim Glue to bind the results together |
1014 | 1014 | * @param string|array $table Table name |
1015 | 1015 | * @param string $field Field name |
1016 | - * @param string|array $conds Conditions |
|
1016 | + * @param string $conds Conditions |
|
1017 | 1017 | * @param string|array $join_conds Join conditions |
1018 | 1018 | * @return string SQL text |
1019 | 1019 | * @since 1.23 |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | * Adds quotes and backslashes. |
1054 | 1054 | * |
1055 | 1055 | * @param string|int|null|bool|Blob $s |
1056 | - * @return string|int |
|
1056 | + * @return string |
|
1057 | 1057 | */ |
1058 | 1058 | public function addQuotes( $s ); |
1059 | 1059 | |
@@ -1572,7 +1572,7 @@ discard block |
||
1572 | 1572 | * The result is unquoted, and needs to be passed through addQuotes() |
1573 | 1573 | * before it can be included in raw SQL. |
1574 | 1574 | * |
1575 | - * @param string|int $ts |
|
1575 | + * @param integer $ts |
|
1576 | 1576 | * |
1577 | 1577 | * @return string |
1578 | 1578 | */ |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | } |
651 | 651 | |
652 | 652 | /** |
653 | - * @return bool|string |
|
653 | + * @return string|false |
|
654 | 654 | */ |
655 | 655 | protected function restoreErrorHandler() { |
656 | 656 | restore_error_handler(); |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | } |
663 | 663 | |
664 | 664 | /** |
665 | - * @return string|bool Last PHP error for this DB (typically connection errors) |
|
665 | + * @return string|false Last PHP error for this DB (typically connection errors) |
|
666 | 666 | */ |
667 | 667 | protected function getLastPHPError() { |
668 | 668 | if ( $this->mPHPError ) { |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | } |
771 | 771 | |
772 | 772 | /** |
773 | - * @param $sql |
|
773 | + * @param string $sql |
|
774 | 774 | * @return string|null |
775 | 775 | */ |
776 | 776 | protected function getQueryVerb( $sql ) { |
@@ -917,6 +917,12 @@ discard block |
||
917 | 917 | return $res; |
918 | 918 | } |
919 | 919 | |
920 | + /** |
|
921 | + * @param string $sql |
|
922 | + * @param string $commentedSql |
|
923 | + * @param boolean $isWrite |
|
924 | + * @param string $fname |
|
925 | + */ |
|
920 | 926 | private function doProfiledQuery( $sql, $commentedSql, $isWrite, $fname ) { |
921 | 927 | $isMaster = !is_null( $this->getLBInfo( 'master' ) ); |
922 | 928 | # generalizeSQL() will probably cut down the query to reasonable |
@@ -998,6 +1004,10 @@ discard block |
||
998 | 1004 | } |
999 | 1005 | } |
1000 | 1006 | |
1007 | + /** |
|
1008 | + * @param string $sql |
|
1009 | + * @param boolean $priorWritesPending |
|
1010 | + */ |
|
1001 | 1011 | private function canRecoverFromDisconnect( $sql, $priorWritesPending ) { |
1002 | 1012 | # Transaction dropped; this can mean lost writes, or REPEATABLE-READ snapshots. |
1003 | 1013 | # Dropped connections also mean that named locks are automatically released. |
@@ -1117,7 +1127,7 @@ discard block |
||
1117 | 1127 | * |
1118 | 1128 | * @param array $options Associative array of options to be turned into |
1119 | 1129 | * an SQL query, valid keys are listed in the function. |
1120 | - * @return array |
|
1130 | + * @return string[] |
|
1121 | 1131 | * @see Database::select() |
1122 | 1132 | */ |
1123 | 1133 | protected function makeSelectOptions( $options ) { |
@@ -2288,6 +2298,9 @@ discard block |
||
2288 | 2298 | return $this->insert( $destTable, $rows, $fname, $insertOptions ); |
2289 | 2299 | } |
2290 | 2300 | |
2301 | + /** |
|
2302 | + * @param string $destTable |
|
2303 | + */ |
|
2291 | 2304 | protected function nativeInsertSelect( $destTable, $srcTable, $varMap, $conds, |
2292 | 2305 | $fname = __METHOD__, |
2293 | 2306 | $insertOptions = [], $selectOptions = [] |
@@ -3365,7 +3378,7 @@ discard block |
||
3365 | 3378 | } |
3366 | 3379 | |
3367 | 3380 | /** |
3368 | - * @return string|bool Reason this DB is read-only or false if it is not |
|
3381 | + * @return string|false Reason this DB is read-only or false if it is not |
|
3369 | 3382 | */ |
3370 | 3383 | protected function getReadOnlyReason() { |
3371 | 3384 | $reason = $this->getLBInfo( 'readOnlyReason' ); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | * @param string $dbName |
145 | 145 | * |
146 | 146 | * @throws DBConnectionError |
147 | - * @return PDO |
|
147 | + * @return resource|null |
|
148 | 148 | */ |
149 | 149 | function open( $server, $user, $pass, $dbName ) { |
150 | 150 | $this->close(); |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | * Filter the options used in SELECT statements |
544 | 544 | * |
545 | 545 | * @param array $options |
546 | - * @return array |
|
546 | + * @return string[] |
|
547 | 547 | */ |
548 | 548 | function makeSelectOptions( $options ) { |
549 | 549 | foreach ( $options as $k => $v ) { |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | |
774 | 774 | /** |
775 | 775 | * @param string|int|null|bool|Blob $s |
776 | - * @return string|int |
|
776 | + * @return string |
|
777 | 777 | */ |
778 | 778 | function addQuotes( $s ) { |
779 | 779 | if ( $s instanceof Blob ) { |