@@ -205,42 +205,42 @@ discard block |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
208 | - * @return mixed DB key name, or false on failure |
|
208 | + * @return boolean DB key name, or false on failure |
|
209 | 209 | */ |
210 | 210 | public function getName() { |
211 | 211 | return $this->getX( 'mName' ); |
212 | 212 | } |
213 | 213 | |
214 | 214 | /** |
215 | - * @return mixed Category ID, or false on failure |
|
215 | + * @return boolean Category ID, or false on failure |
|
216 | 216 | */ |
217 | 217 | public function getID() { |
218 | 218 | return $this->getX( 'mID' ); |
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
222 | - * @return mixed Total number of member pages, or false on failure |
|
222 | + * @return boolean Total number of member pages, or false on failure |
|
223 | 223 | */ |
224 | 224 | public function getPageCount() { |
225 | 225 | return $this->getX( 'mPages' ); |
226 | 226 | } |
227 | 227 | |
228 | 228 | /** |
229 | - * @return mixed Number of subcategories, or false on failure |
|
229 | + * @return boolean Number of subcategories, or false on failure |
|
230 | 230 | */ |
231 | 231 | public function getSubcatCount() { |
232 | 232 | return $this->getX( 'mSubcats' ); |
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
236 | - * @return mixed Number of member files, or false on failure |
|
236 | + * @return boolean Number of member files, or false on failure |
|
237 | 237 | */ |
238 | 238 | public function getFileCount() { |
239 | 239 | return $this->getX( 'mFiles' ); |
240 | 240 | } |
241 | 241 | |
242 | 242 | /** |
243 | - * @return Title|bool Title for this category, or false on failure. |
|
243 | + * @return Title Title for this category, or false on failure. |
|
244 | 244 | */ |
245 | 245 | public function getTitle() { |
246 | 246 | if ( $this->mTitle ) { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | * category sort key $offset. |
261 | 261 | * @param int $limit |
262 | 262 | * @param string $offset |
263 | - * @return TitleArray TitleArray object for category members. |
|
263 | + * @return TitleArrayFromResult|null TitleArray object for category members. |
|
264 | 264 | */ |
265 | 265 | public function getMembers( $limit = false, $offset = '' ) { |
266 | 266 |
@@ -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; |