@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | * |
660 | 660 | * @param IContextSource $context Context to use, anything else will be ignored. |
661 | 661 | * @param int $old Revision ID we want to show and diff with. |
662 | - * @param int|string $new Either a revision ID or one of the strings 'cur', 'prev' or 'next'. |
|
662 | + * @param integer $new Either a revision ID or one of the strings 'cur', 'prev' or 'next'. |
|
663 | 663 | * @param int $rcid FIXME: Deprecated, no longer used. Defaults to 0. |
664 | 664 | * @param bool $refreshCache If set, refreshes the diff cache. Defaults to false. |
665 | 665 | * @param bool $unhide If set, allow viewing deleted revs. Defaults to false. |
@@ -889,7 +889,7 @@ discard block |
||
889 | 889 | * @param Title $title The page's title |
890 | 890 | * @param bool &$hasHistory Whether the page has a history |
891 | 891 | * |
892 | - * @return mixed String containing deletion reason or empty string, or |
|
892 | + * @return false|string String containing deletion reason or empty string, or |
|
893 | 893 | * boolean false if no revision occurred |
894 | 894 | * |
895 | 895 | * @todo &$hasHistory is extremely ugly, it's here because |
@@ -373,8 +373,8 @@ discard block |
||
373 | 373 | /** |
374 | 374 | * SELECT wrapper |
375 | 375 | * |
376 | - * @param mixed $table Array or string, table name(s) (prefix auto-added) |
|
377 | - * @param mixed $vars Array or string, field name(s) to be retrieved |
|
376 | + * @param string $table Array or string, table name(s) (prefix auto-added) |
|
377 | + * @param string $vars Array or string, field name(s) to be retrieved |
|
378 | 378 | * @param mixed $conds Array or string, condition(s) for WHERE |
379 | 379 | * @param string $fname Calling function name (use __METHOD__) for logs/profiling |
380 | 380 | * @param array $options Associative array of options (e.g. |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | * code for list of supported stuff |
383 | 383 | * @param array $join_conds Associative array of table join conditions |
384 | 384 | * (optional) (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') ) |
385 | - * @return mixed Database result resource (feed to Database::fetchObject |
|
385 | + * @return MssqlResultWrapper Database result resource (feed to Database::fetchObject |
|
386 | 386 | * or whatever), or false on failure |
387 | 387 | * @throws DBQueryError |
388 | 388 | * @throws DBUnexpectedError |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | * |
872 | 872 | * @param string $sql SQL query we will append the limit too |
873 | 873 | * @param int $limit The SQL limit |
874 | - * @param bool|int $offset The SQL offset (default false) |
|
874 | + * @param string|false $offset The SQL offset (default false) |
|
875 | 875 | * @return array|string |
876 | 876 | * @throws DBUnexpectedError |
877 | 877 | */ |
@@ -1189,7 +1189,7 @@ discard block |
||
1189 | 1189 | /** |
1190 | 1190 | * @param array $options An associative array of options to be turned into |
1191 | 1191 | * an SQL query, valid keys are listed in the function. |
1192 | - * @return array |
|
1192 | + * @return string[] |
|
1193 | 1193 | */ |
1194 | 1194 | public function makeSelectOptions( $options ) { |
1195 | 1195 | $tailOpts = ''; |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | /** |
377 | 377 | * Get the name of the specified field in a result |
378 | 378 | * |
379 | - * @param ResultWrapper|resource $res |
|
379 | + * @param resource $res |
|
380 | 380 | * @param int $n |
381 | 381 | * @return string |
382 | 382 | */ |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | /** |
400 | 400 | * Get the type of the specified field in a result |
401 | 401 | * |
402 | - * @param ResultWrapper|resource $res |
|
402 | + * @param resource $res |
|
403 | 403 | * @param int $n |
404 | 404 | * @return string |
405 | 405 | */ |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | /** |
422 | 422 | * Move internal result pointer |
423 | 423 | * |
424 | - * @param ResultWrapper|resource $res |
|
424 | + * @param resource $res |
|
425 | 425 | * @param int $row |
426 | 426 | * @return bool |
427 | 427 | */ |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | /** |
836 | 836 | * Get the position of the master from SHOW SLAVE STATUS |
837 | 837 | * |
838 | - * @return MySQLMasterPos|bool |
|
838 | + * @return DBMasterPos |
|
839 | 839 | */ |
840 | 840 | function getSlavePos() { |
841 | 841 | $res = $this->query( 'SHOW SLAVE STATUS', __METHOD__ ); |
@@ -1016,6 +1016,9 @@ discard block |
||
1016 | 1016 | return false; |
1017 | 1017 | } |
1018 | 1018 | |
1019 | + /** |
|
1020 | + * @param string $lockName |
|
1021 | + */ |
|
1019 | 1022 | private function makeLockName( $lockName ) { |
1020 | 1023 | // http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock |
1021 | 1024 | // Newer version enforce a 64 char length limit. |
@@ -1371,6 +1374,9 @@ discard block |
||
1371 | 1374 | $is_pk, $is_unique, $is_multiple, $is_key, $type, $binary, |
1372 | 1375 | $is_numeric, $is_blob, $is_unsigned, $is_zerofill; |
1373 | 1376 | |
1377 | + /** |
|
1378 | + * @param stdClass $info |
|
1379 | + */ |
|
1374 | 1380 | function __construct( $info ) { |
1375 | 1381 | $this->name = $info->name; |
1376 | 1382 | $this->tablename = $info->table; |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | unset( $this->db ); |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @param integer $row |
|
90 | + */ |
|
88 | 91 | public function seek( $row ) { |
89 | 92 | $this->cursor = min( $row, $this->nrows ); |
90 | 93 | } |
@@ -583,6 +586,9 @@ discard block |
||
583 | 586 | return $retVal; |
584 | 587 | } |
585 | 588 | |
589 | + /** |
|
590 | + * @param string $table |
|
591 | + */ |
|
586 | 592 | private function fieldBindStatement( $table, $col, &$val, $includeCol = false ) { |
587 | 593 | $col_info = $this->fieldInfoMulti( $table, $col ); |
588 | 594 | $col_type = $col_info != false ? $col_info->type() : 'CONSTANT'; |
@@ -824,6 +830,9 @@ discard block |
||
824 | 830 | return strtoupper( parent::tableName( $name, $format ) ); |
825 | 831 | } |
826 | 832 | |
833 | + /** |
|
834 | + * @param string $name |
|
835 | + */ |
|
827 | 836 | function tableNameInternal( $name ) { |
828 | 837 | $name = $this->tableName( $name ); |
829 | 838 | |
@@ -1281,6 +1290,9 @@ discard block |
||
1281 | 1290 | return "'" . $this->strencode( $s ) . "'"; |
1282 | 1291 | } |
1283 | 1292 | |
1293 | + /** |
|
1294 | + * @param string $s |
|
1295 | + */ |
|
1284 | 1296 | public function addIdentifierQuotes( $s ) { |
1285 | 1297 | if ( !$this->getFlag( DBO_DDLMODE ) ) { |
1286 | 1298 | $s = '/*Q*/' . $s; |
@@ -1344,7 +1356,7 @@ discard block |
||
1344 | 1356 | * |
1345 | 1357 | * @param array $options An associative array of options to be turned into |
1346 | 1358 | * an SQL query, valid keys are listed in the function. |
1347 | - * @return array |
|
1359 | + * @return string[] |
|
1348 | 1360 | */ |
1349 | 1361 | function makeSelectOptions( $options ) { |
1350 | 1362 | $preLimitTail = $postLimitTail = ''; |
@@ -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 = '" . |
@@ -1308,6 +1316,10 @@ discard block |
||
1308 | 1316 | return $this->relationExists( $sequence, 'S', $schema ); |
1309 | 1317 | } |
1310 | 1318 | |
1319 | + /** |
|
1320 | + * @param string $table |
|
1321 | + * @param string $trigger |
|
1322 | + */ |
|
1311 | 1323 | function triggerExists( $table, $trigger ) { |
1312 | 1324 | $q = <<<SQL |
1313 | 1325 | SELECT 1 FROM pg_class, pg_namespace, pg_trigger |
@@ -1331,6 +1343,10 @@ discard block |
||
1331 | 1343 | return $rows; |
1332 | 1344 | } |
1333 | 1345 | |
1346 | + /** |
|
1347 | + * @param string $table |
|
1348 | + * @param string $rule |
|
1349 | + */ |
|
1334 | 1350 | function ruleExists( $table, $rule ) { |
1335 | 1351 | $exists = $this->selectField( 'pg_rules', 'rulename', |
1336 | 1352 | [ |
@@ -1478,7 +1494,7 @@ discard block |
||
1478 | 1494 | * |
1479 | 1495 | * @param array $options An associative array of options to be turned into |
1480 | 1496 | * an SQL query, valid keys are listed in the function. |
1481 | - * @return array |
|
1497 | + * @return string[] |
|
1482 | 1498 | */ |
1483 | 1499 | function makeSelectOptions( $options ) { |
1484 | 1500 | $preLimitTail = $postLimitTail = ''; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * Constructor |
105 | 105 | * @param IContextSource $context Context to use, anything else will be ignored |
106 | 106 | * @param int $old Old ID we want to show and diff with. |
107 | - * @param string|int $new Either revision ID or 'prev' or 'next'. Default: 0. |
|
107 | + * @param integer $new Either revision ID or 'prev' or 'next'. Default: 0. |
|
108 | 108 | * @param int $rcid Deprecated, no longer used! |
109 | 109 | * @param bool $refreshCache If set, refreshes the diff cache |
110 | 110 | * @param bool $unhide If set, allow viewing deleted revs |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * |
175 | 175 | * @param int $id Revision ID |
176 | 176 | * |
177 | - * @return mixed URL or false |
|
177 | + * @return string|false URL or false |
|
178 | 178 | */ |
179 | 179 | public function deletedLink( $id ) { |
180 | 180 | if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) { |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | * @param string|bool $ntitle Header for new text or false |
677 | 677 | * @param string $notice HTML between diff header and body |
678 | 678 | * |
679 | - * @return mixed |
|
679 | + * @return false|string |
|
680 | 680 | */ |
681 | 681 | public function getDiff( $otitle, $ntitle, $notice = '' ) { |
682 | 682 | $body = $this->getDiffBody(); |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | /** |
699 | 699 | * Get the diff table body, without header |
700 | 700 | * |
701 | - * @return mixed (string/false) |
|
701 | + * @return false|string (string/false) |
|
702 | 702 | */ |
703 | 703 | public function getDiffBody() { |
704 | 704 | $this->mCacheHit = true; |
@@ -973,7 +973,7 @@ discard block |
||
973 | 973 | * |
974 | 974 | * @param string $text |
975 | 975 | * |
976 | - * @return mixed |
|
976 | + * @return string |
|
977 | 977 | */ |
978 | 978 | public function localiseLineNumbers( $text ) { |
979 | 979 | return preg_replace_callback( |
@@ -73,7 +73,7 @@ |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * @param array $newname |
|
76 | + * @param string $newname |
|
77 | 77 | * @return string |
78 | 78 | * @throws MWException |
79 | 79 | */ |
@@ -192,7 +192,7 @@ |
||
192 | 192 | /** |
193 | 193 | * Get an explanatory message if this backend is read-only |
194 | 194 | * |
195 | - * @return string|bool Returns false if the backend is not read-only |
|
195 | + * @return string|false Returns false if the backend is not read-only |
|
196 | 196 | */ |
197 | 197 | final public function getReadOnlyReason() { |
198 | 198 | return ( $this->readOnly != '' ) ? $this->readOnly : false; |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | /** |
754 | 754 | * @see FileBackendStore::getFileSha1Base36() |
755 | 755 | * @param array $params |
756 | - * @return bool|string |
|
756 | + * @return false|string |
|
757 | 757 | */ |
758 | 758 | protected function doGetFileSha1Base36( array $params ) { |
759 | 759 | $fsFile = $this->getLocalReference( $params ); |
@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | * @param FileBackendStoreOpHandle[] $fileOpHandles |
1191 | 1191 | * |
1192 | 1192 | * @throws FileBackendError |
1193 | - * @return array Map of Status objects |
|
1193 | + * @return Status[] Map of Status objects |
|
1194 | 1194 | */ |
1195 | 1195 | final public function executeOpHandlesInternal( array $fileOpHandles ) { |
1196 | 1196 | $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" ); |