@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | /** |
| 38 | 38 | * @throws MWException |
| 39 | 39 | * @param string $collationName |
| 40 | - * @return Collation |
|
| 40 | + * @return string |
|
| 41 | 41 | */ |
| 42 | 42 | static function factory( $collationName ) { |
| 43 | 43 | switch ( $collationName ) { |
@@ -296,6 +296,9 @@ discard block |
||
| 296 | 296 | |
| 297 | 297 | const RECORD_LENGTH = 14; |
| 298 | 298 | |
| 299 | + /** |
|
| 300 | + * @param string $locale |
|
| 301 | + */ |
|
| 299 | 302 | function __construct( $locale ) { |
| 300 | 303 | if ( !extension_loaded( 'intl' ) ) { |
| 301 | 304 | throw new MWException( 'An ICU collation was requested, ' . |
@@ -512,6 +515,9 @@ discard block |
||
| 512 | 515 | return $data; |
| 513 | 516 | } |
| 514 | 517 | |
| 518 | + /** |
|
| 519 | + * @param integer $index |
|
| 520 | + */ |
|
| 515 | 521 | function getLetterByIndex( $index ) { |
| 516 | 522 | if ( $this->firstLetterData === null ) { |
| 517 | 523 | $this->getFirstLetterData(); |
@@ -563,7 +569,7 @@ discard block |
||
| 563 | 569 | * currently in use, or false when it can't be determined. |
| 564 | 570 | * |
| 565 | 571 | * @since 1.21 |
| 566 | - * @return string|bool |
|
| 572 | + * @return false|string |
|
| 567 | 573 | */ |
| 568 | 574 | static function getUnicodeVersionForICU() { |
| 569 | 575 | $icuVersion = IcuCollation::getICUVersion(); |
@@ -621,6 +627,11 @@ discard block |
||
| 621 | 627 | parent::__construct( 'et' ); |
| 622 | 628 | } |
| 623 | 629 | |
| 630 | + /** |
|
| 631 | + * @param string $string |
|
| 632 | + * |
|
| 633 | + * @return string |
|
| 634 | + */ |
|
| 624 | 635 | private static function mangle( $string ) { |
| 625 | 636 | return str_replace( |
| 626 | 637 | array( 'w', 'W' ), |
@@ -629,6 +640,9 @@ discard block |
||
| 629 | 640 | ); |
| 630 | 641 | } |
| 631 | 642 | |
| 643 | + /** |
|
| 644 | + * @param string $string |
|
| 645 | + */ |
|
| 632 | 646 | private static function unmangle( $string ) { |
| 633 | 647 | // Casing data is lost… |
| 634 | 648 | return str_replace( |
@@ -219,7 +219,7 @@ |
||
| 219 | 219 | * @param bool $recursive |
| 220 | 220 | * @param ParserOutput $parserOutput |
| 221 | 221 | * |
| 222 | - * @return DataUpdate[] |
|
| 222 | + * @return LinksUpdate[] |
|
| 223 | 223 | * |
| 224 | 224 | * @see Content::getSecondaryDataUpdates() |
| 225 | 225 | */ |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | * |
| 650 | 650 | * @param IContextSource $context Context to use, anything else will be ignored. |
| 651 | 651 | * @param int $old Revision ID we want to show and diff with. |
| 652 | - * @param int|string $new Either a revision ID or one of the strings 'cur', 'prev' or 'next'. |
|
| 652 | + * @param integer $new Either a revision ID or one of the strings 'cur', 'prev' or 'next'. |
|
| 653 | 653 | * @param int $rcid FIXME: Deprecated, no longer used. Defaults to 0. |
| 654 | 654 | * @param bool $refreshCache If set, refreshes the diff cache. Defaults to false. |
| 655 | 655 | * @param bool $unhide If set, allow viewing deleted revs. Defaults to false. |
@@ -787,7 +787,7 @@ discard block |
||
| 787 | 787 | * @param Content $myContent One of the page's conflicting contents. |
| 788 | 788 | * @param Content $yourContent One of the page's conflicting contents. |
| 789 | 789 | * |
| 790 | - * @return Content|bool Always false. |
|
| 790 | + * @return boolean Always false. |
|
| 791 | 791 | */ |
| 792 | 792 | public function merge3( Content $oldContent, Content $myContent, Content $yourContent ) { |
| 793 | 793 | return false; |
@@ -879,7 +879,7 @@ discard block |
||
| 879 | 879 | * @param Title $title The page's title |
| 880 | 880 | * @param bool &$hasHistory Whether the page has a history |
| 881 | 881 | * |
| 882 | - * @return mixed String containing deletion reason or empty string, or |
|
| 882 | + * @return false|string String containing deletion reason or empty string, or |
|
| 883 | 883 | * boolean false if no revision occurred |
| 884 | 884 | * |
| 885 | 885 | * @todo &$hasHistory is extremely ugly, it's here because |
@@ -989,7 +989,7 @@ discard block |
||
| 989 | 989 | * @param Revision $undo The revision to undo |
| 990 | 990 | * @param Revision $undoafter Must be an earlier revision than $undo |
| 991 | 991 | * |
| 992 | - * @return mixed String on success, false on failure |
|
| 992 | + * @return null|Content String on success, false on failure |
|
| 993 | 993 | */ |
| 994 | 994 | public function getUndoContent( Revision $current, Revision $undo, Revision $undoafter ) { |
| 995 | 995 | $cur_content = $current->getContent(); |
@@ -329,7 +329,6 @@ |
||
| 329 | 329 | * it would set only the original context, and not take |
| 330 | 330 | * into account any changes. |
| 331 | 331 | * |
| 332 | - * @param mixed $args,... Arguments to wfMessage |
|
| 333 | 332 | * @return Message |
| 334 | 333 | */ |
| 335 | 334 | public function msg() { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | * - false to disable debugging |
| 185 | 185 | * - omitted or null to do nothing |
| 186 | 186 | * |
| 187 | - * @return bool|null Previous value of the flag |
|
| 187 | + * @return boolean Previous value of the flag |
|
| 188 | 188 | */ |
| 189 | 189 | public function debug( $debug = null ) { |
| 190 | 190 | return wfSetBit( $this->mFlags, DBO_DEBUG, $debug ); |
@@ -635,7 +635,7 @@ discard block |
||
| 635 | 635 | } |
| 636 | 636 | |
| 637 | 637 | /** |
| 638 | - * @return bool|string |
|
| 638 | + * @return string|false |
|
| 639 | 639 | */ |
| 640 | 640 | protected function restoreErrorHandler() { |
| 641 | 641 | restore_error_handler(); |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | * |
| 1081 | 1081 | * @param array $options Associative array of options to be turned into |
| 1082 | 1082 | * an SQL query, valid keys are listed in the function. |
| 1083 | - * @return array |
|
| 1083 | + * @return string[] |
|
| 1084 | 1084 | * @see DatabaseBase::select() |
| 1085 | 1085 | */ |
| 1086 | 1086 | public function makeSelectOptions( $options ) { |
@@ -2921,8 +2921,8 @@ discard block |
||
| 2921 | 2921 | * on object's error ignore settings). |
| 2922 | 2922 | * |
| 2923 | 2923 | * @param string $filename File name to open |
| 2924 | - * @param bool|callable $lineCallback Optional function called before reading each line |
|
| 2925 | - * @param bool|callable $resultCallback Optional function called for each MySQL result |
|
| 2924 | + * @param boolean $lineCallback Optional function called before reading each line |
|
| 2925 | + * @param boolean $resultCallback Optional function called for each MySQL result |
|
| 2926 | 2926 | * @param bool|string $fname Calling function name or false if name should be |
| 2927 | 2927 | * generated dynamically using $filename |
| 2928 | 2928 | * @param bool|callable $inputCallback Optional function called for each |
@@ -3235,7 +3235,7 @@ discard block |
||
| 3235 | 3235 | } |
| 3236 | 3236 | |
| 3237 | 3237 | /** |
| 3238 | - * @return string|bool Reason this DB is read-only or false if it is not |
|
| 3238 | + * @return string|false Reason this DB is read-only or false if it is not |
|
| 3239 | 3239 | */ |
| 3240 | 3240 | protected function getReadOnlyReason() { |
| 3241 | 3241 | $reason = $this->getLBInfo( 'readOnlyReason' ); |
@@ -328,7 +328,7 @@ |
||
| 328 | 328 | /** |
| 329 | 329 | * @param DatabaseBase $db |
| 330 | 330 | * @param string $error |
| 331 | - * @param int|string $errno |
|
| 331 | + * @param integer $errno |
|
| 332 | 332 | * @param string $sql |
| 333 | 333 | * @param string $fname |
| 334 | 334 | */ |
@@ -369,8 +369,8 @@ discard block |
||
| 369 | 369 | /** |
| 370 | 370 | * SELECT wrapper |
| 371 | 371 | * |
| 372 | - * @param mixed $table Array or string, table name(s) (prefix auto-added) |
|
| 373 | - * @param mixed $vars Array or string, field name(s) to be retrieved |
|
| 372 | + * @param string $table Array or string, table name(s) (prefix auto-added) |
|
| 373 | + * @param string $vars Array or string, field name(s) to be retrieved |
|
| 374 | 374 | * @param mixed $conds Array or string, condition(s) for WHERE |
| 375 | 375 | * @param string $fname Calling function name (use __METHOD__) for logs/profiling |
| 376 | 376 | * @param array $options Associative array of options (e.g. |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | * code for list of supported stuff |
| 379 | 379 | * @param array $join_conds Associative array of table join conditions |
| 380 | 380 | * (optional) (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) |
| 381 | - * @return mixed Database result resource (feed to Database::fetchObject |
|
| 381 | + * @return MssqlResultWrapper Database result resource (feed to Database::fetchObject |
|
| 382 | 382 | * or whatever), or false on failure |
| 383 | 383 | * @throws DBQueryError |
| 384 | 384 | * @throws DBUnexpectedError |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | * @param string $fname |
| 717 | 717 | * @param array $insertOptions |
| 718 | 718 | * @param array $selectOptions |
| 719 | - * @return null|ResultWrapper |
|
| 719 | + * @return ResultWrapper |
|
| 720 | 720 | * @throws Exception |
| 721 | 721 | */ |
| 722 | 722 | public function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = __METHOD__, |
@@ -860,7 +860,7 @@ discard block |
||
| 860 | 860 | * |
| 861 | 861 | * @param string $sql SQL query we will append the limit too |
| 862 | 862 | * @param int $limit The SQL limit |
| 863 | - * @param bool|int $offset The SQL offset (default false) |
|
| 863 | + * @param string|false $offset The SQL offset (default false) |
|
| 864 | 864 | * @return array|string |
| 865 | 865 | * @throws DBUnexpectedError |
| 866 | 866 | */ |
@@ -1149,7 +1149,7 @@ discard block |
||
| 1149 | 1149 | /** |
| 1150 | 1150 | * @param array $options An associative array of options to be turned into |
| 1151 | 1151 | * an SQL query, valid keys are listed in the function. |
| 1152 | - * @return array |
|
| 1152 | + * @return string[] |
|
| 1153 | 1153 | */ |
| 1154 | 1154 | public function makeSelectOptions( $options ) { |
| 1155 | 1155 | $tailOpts = ''; |
@@ -168,6 +168,11 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | + /** |
|
| 172 | + * @param string $keyword |
|
| 173 | + * @param string $msg_ok |
|
| 174 | + * @param string $msg_failed |
|
| 175 | + */ |
|
| 171 | 176 | protected function query( $keyword, $msg_ok, $msg_failed ) { |
| 172 | 177 | if ( $this->dbw->doQuery( $keyword . " " . $this->id ) !== false ) { |
| 173 | 178 | } else { |
@@ -259,6 +264,9 @@ discard block |
||
| 259 | 264 | return true; |
| 260 | 265 | } |
| 261 | 266 | |
| 267 | + /** |
|
| 268 | + * @param string $name |
|
| 269 | + */ |
|
| 262 | 270 | function hasConstraint( $name ) { |
| 263 | 271 | $sql = "SELECT 1 FROM pg_catalog.pg_constraint c, pg_catalog.pg_namespace n " . |
| 264 | 272 | "WHERE c.connamespace = n.oid AND conname = '" . |
@@ -550,7 +558,7 @@ discard block |
||
| 550 | 558 | * Return the result of the last call to nextSequenceValue(); |
| 551 | 559 | * This must be called after nextSequenceValue(). |
| 552 | 560 | * |
| 553 | - * @return int|null |
|
| 561 | + * @return integer |
|
| 554 | 562 | */ |
| 555 | 563 | function insertId() { |
| 556 | 564 | return $this->mInsertId; |
@@ -1310,6 +1318,10 @@ discard block |
||
| 1310 | 1318 | return $this->relationExists( $sequence, 'S', $schema ); |
| 1311 | 1319 | } |
| 1312 | 1320 | |
| 1321 | + /** |
|
| 1322 | + * @param string $table |
|
| 1323 | + * @param string $trigger |
|
| 1324 | + */ |
|
| 1313 | 1325 | function triggerExists( $table, $trigger ) { |
| 1314 | 1326 | $q = <<<SQL |
| 1315 | 1327 | SELECT 1 FROM pg_class, pg_namespace, pg_trigger |
@@ -1333,6 +1345,10 @@ discard block |
||
| 1333 | 1345 | return $rows; |
| 1334 | 1346 | } |
| 1335 | 1347 | |
| 1348 | + /** |
|
| 1349 | + * @param string $table |
|
| 1350 | + * @param string $rule |
|
| 1351 | + */ |
|
| 1336 | 1352 | function ruleExists( $table, $rule ) { |
| 1337 | 1353 | $exists = $this->selectField( 'pg_rules', 'rulename', |
| 1338 | 1354 | array( |
@@ -1475,7 +1491,7 @@ discard block |
||
| 1475 | 1491 | * |
| 1476 | 1492 | * @param array $options An associative array of options to be turned into |
| 1477 | 1493 | * an SQL query, valid keys are listed in the function. |
| 1478 | - * @return array |
|
| 1494 | + * @return string[] |
|
| 1479 | 1495 | */ |
| 1480 | 1496 | function makeSelectOptions( $options ) { |
| 1481 | 1497 | $preLimitTail = $postLimitTail = ''; |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | * Filter the options used in SELECT statements |
| 552 | 552 | * |
| 553 | 553 | * @param array $options |
| 554 | - * @return array |
|
| 554 | + * @return string[] |
|
| 555 | 555 | */ |
| 556 | 556 | function makeSelectOptions( $options ) { |
| 557 | 557 | foreach ( $options as $k => $v ) { |
@@ -1048,6 +1048,9 @@ discard block |
||
| 1048 | 1048 | class SQLiteField implements Field { |
| 1049 | 1049 | private $info, $tableName; |
| 1050 | 1050 | |
| 1051 | + /** |
|
| 1052 | + * @param string $tableName |
|
| 1053 | + */ |
|
| 1051 | 1054 | function __construct( $info, $tableName ) { |
| 1052 | 1055 | $this->info = $info; |
| 1053 | 1056 | $this->tableName = $tableName; |