@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | * Filter the options used in SELECT statements |
555 | 555 | * |
556 | 556 | * @param array $options |
557 | - * @return array |
|
557 | + * @return string[] |
|
558 | 558 | */ |
559 | 559 | function makeSelectOptions( $options ) { |
560 | 560 | foreach ( $options as $k => $v ) { |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | |
785 | 785 | /** |
786 | 786 | * @param string|int|null|bool|Blob $s |
787 | - * @return string|int |
|
787 | + * @return string |
|
788 | 788 | */ |
789 | 789 | function addQuotes( $s ) { |
790 | 790 | if ( $s instanceof Blob ) { |
@@ -235,7 +235,6 @@ discard block |
||
235 | 235 | * [ 'y' ] |
236 | 236 | * ] |
237 | 237 | * |
238 | - * @param array $array1,... |
|
239 | 238 | * @return array |
240 | 239 | */ |
241 | 240 | function wfMergeErrorArrays( /*...*/ ) { |
@@ -262,8 +261,8 @@ discard block |
||
262 | 261 | * |
263 | 262 | * @param array $array The array. |
264 | 263 | * @param array $insert The array to insert. |
265 | - * @param mixed $after The key to insert after |
|
266 | - * @return array |
|
264 | + * @param string $after The key to insert after |
|
265 | + * @return string[] |
|
267 | 266 | */ |
268 | 267 | function wfArrayInsertAfter( array $array, array $insert, $after ) { |
269 | 268 | // Find the offset of the element to insert after. |
@@ -1302,7 +1301,7 @@ discard block |
||
1302 | 1301 | /** |
1303 | 1302 | * Get the value of $wgReadOnly or the contents of $wgReadOnlyFile. |
1304 | 1303 | * |
1305 | - * @return string|bool String when in read-only mode; false otherwise |
|
1304 | + * @return string|false String when in read-only mode; false otherwise |
|
1306 | 1305 | * @since 1.27 |
1307 | 1306 | */ |
1308 | 1307 | function wfConfiguredReadOnlyReason() { |
@@ -1377,7 +1376,6 @@ discard block |
||
1377 | 1376 | * This function replaces all old wfMsg* functions. |
1378 | 1377 | * |
1379 | 1378 | * @param string|string[]|MessageSpecifier $key Message key, or array of keys, or a MessageSpecifier |
1380 | - * @param mixed $params,... Normal message parameters |
|
1381 | 1379 | * @return Message |
1382 | 1380 | * |
1383 | 1381 | * @since 1.17 |
@@ -1398,7 +1396,6 @@ discard block |
||
1398 | 1396 | * for the first message which is non-empty. If all messages are empty then an |
1399 | 1397 | * instance of the first message key is returned. |
1400 | 1398 | * |
1401 | - * @param string|string[] $keys,... Message keys |
|
1402 | 1399 | * @return Message |
1403 | 1400 | * |
1404 | 1401 | * @since 1.18 |
@@ -1631,7 +1628,7 @@ discard block |
||
1631 | 1628 | * Use this when considering to send a gzip-encoded response to the client. |
1632 | 1629 | * |
1633 | 1630 | * @param bool $force Forces another check even if we already have a cached result. |
1634 | - * @return bool |
|
1631 | + * @return null|boolean |
|
1635 | 1632 | */ |
1636 | 1633 | function wfClientAcceptsGzip( $force = false ) { |
1637 | 1634 | static $result = null; |
@@ -1719,7 +1716,7 @@ discard block |
||
1719 | 1716 | * @param mixed $dest |
1720 | 1717 | * @param mixed $source |
1721 | 1718 | * @param bool $force |
1722 | - * @return mixed |
|
1719 | + * @return string |
|
1723 | 1720 | */ |
1724 | 1721 | function wfSetVar( &$dest, $source, $force = false ) { |
1725 | 1722 | $temp = $dest; |
@@ -1769,7 +1766,7 @@ discard block |
||
1769 | 1766 | /** |
1770 | 1767 | * Provide a simple HTTP error. |
1771 | 1768 | * |
1772 | - * @param int|string $code |
|
1769 | + * @param integer $code |
|
1773 | 1770 | * @param string $label |
1774 | 1771 | * @param string $desc |
1775 | 1772 | */ |
@@ -2002,8 +1999,8 @@ discard block |
||
2002 | 1999 | * |
2003 | 2000 | * @param mixed $outputtype A timestamp in one of the supported formats, the |
2004 | 2001 | * function will autodetect which format is supplied and act accordingly. |
2005 | - * @param mixed $ts Optional timestamp to convert, default 0 for the current time |
|
2006 | - * @return string|bool String / false The same date in the format specified in $outputtype or false |
|
2002 | + * @param integer $ts Optional timestamp to convert, default 0 for the current time |
|
2003 | + * @return false|string String / false The same date in the format specified in $outputtype or false |
|
2007 | 2004 | */ |
2008 | 2005 | function wfTimestamp( $outputtype = TS_UNIX, $ts = 0 ) { |
2009 | 2006 | $ret = MWTimestamp::convert( $outputtype, $ts ); |
@@ -2042,7 +2039,7 @@ discard block |
||
2042 | 2039 | /** |
2043 | 2040 | * Check if the operating system is Windows |
2044 | 2041 | * |
2045 | - * @return bool True if it's Windows, false otherwise. |
|
2042 | + * @return boolean|null True if it's Windows, false otherwise. |
|
2046 | 2043 | */ |
2047 | 2044 | function wfIsWindows() { |
2048 | 2045 | static $isWindows = null; |
@@ -2270,7 +2267,7 @@ discard block |
||
2270 | 2267 | /** |
2271 | 2268 | * Check if wfShellExec() is effectively disabled via php.ini config |
2272 | 2269 | * |
2273 | - * @return bool|string False or 'disabled' |
|
2270 | + * @return string|false False or 'disabled' |
|
2274 | 2271 | * @since 1.22 |
2275 | 2272 | */ |
2276 | 2273 | function wfShellExecDisabled() { |
@@ -2884,7 +2881,7 @@ discard block |
||
2884 | 2881 | * @param int $pad Minimum number of digits in the output (pad with zeroes) |
2885 | 2882 | * @param bool $lowercase Whether to output in lowercase or uppercase |
2886 | 2883 | * @param string $engine Either "gmp", "bcmath", or "php" |
2887 | - * @return string|bool The output number as a string, or false on error |
|
2884 | + * @return false|string The output number as a string, or false on error |
|
2888 | 2885 | */ |
2889 | 2886 | function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1, |
2890 | 2887 | $lowercase = true, $engine = 'auto' |
@@ -2969,7 +2966,6 @@ discard block |
||
2969 | 2966 | /** |
2970 | 2967 | * Make a cache key for the local wiki. |
2971 | 2968 | * |
2972 | - * @param string $args,... |
|
2973 | 2969 | * @return string |
2974 | 2970 | */ |
2975 | 2971 | function wfMemcKey( /*...*/ ) { |
@@ -2986,7 +2982,6 @@ discard block |
||
2986 | 2982 | * |
2987 | 2983 | * @param string $db |
2988 | 2984 | * @param string $prefix |
2989 | - * @param string $args,... |
|
2990 | 2985 | * @return string |
2991 | 2986 | */ |
2992 | 2987 | function wfForeignMemcKey( $db, $prefix /*...*/ ) { |
@@ -3006,7 +3001,6 @@ discard block |
||
3006 | 3001 | * in the first segment will clash with wfMemcKey/wfForeignMemcKey. |
3007 | 3002 | * |
3008 | 3003 | * @since 1.26 |
3009 | - * @param string $args,... |
|
3010 | 3004 | * @return string |
3011 | 3005 | */ |
3012 | 3006 | function wfGlobalCacheKey( /*...*/ ) { |
@@ -3121,7 +3115,7 @@ discard block |
||
3121 | 3115 | * Returns a valid placeholder object if the file does not exist. |
3122 | 3116 | * |
3123 | 3117 | * @param Title|string $title |
3124 | - * @return LocalFile|null A File, or null if passed an invalid Title |
|
3118 | + * @return File|null A File, or null if passed an invalid Title |
|
3125 | 3119 | */ |
3126 | 3120 | function wfLocalFile( $title ) { |
3127 | 3121 | return RepoGroup::singleton()->getLocalRepo()->newFile( $title ); |
@@ -3326,7 +3320,7 @@ discard block |
||
3326 | 3320 | /** |
3327 | 3321 | * Set PHP's time limit to the larger of php.ini or $wgTransactionalTimeLimit |
3328 | 3322 | * |
3329 | - * @return int Prior time limit |
|
3323 | + * @return string Prior time limit |
|
3330 | 3324 | * @since 1.26 |
3331 | 3325 | */ |
3332 | 3326 | function wfTransactionalTimeLimit() { |
@@ -3462,7 +3456,7 @@ discard block |
||
3462 | 3456 | * |
3463 | 3457 | * @param string $format The format string (See php's docs) |
3464 | 3458 | * @param string $data A binary string of binary data |
3465 | - * @param int|bool $length The minimum length of $data or false. This is to |
|
3459 | + * @param integer $length The minimum length of $data or false. This is to |
|
3466 | 3460 | * prevent reading beyond the end of $data. false to disable the check. |
3467 | 3461 | * |
3468 | 3462 | * Also be careful when using this function to read unsigned 32 bit integer |
@@ -60,6 +60,9 @@ discard block |
||
60 | 60 | return false; |
61 | 61 | } |
62 | 62 | |
63 | + /** |
|
64 | + * @param string $name |
|
65 | + */ |
|
63 | 66 | public function hasConstraint( $name ) { |
64 | 67 | $conn = $this->getBindingHandle(); |
65 | 68 | |
@@ -1070,6 +1073,10 @@ discard block |
||
1070 | 1073 | return $this->relationExists( $sequence, 'S', $schema ); |
1071 | 1074 | } |
1072 | 1075 | |
1076 | + /** |
|
1077 | + * @param string $table |
|
1078 | + * @param string $trigger |
|
1079 | + */ |
|
1073 | 1080 | public function triggerExists( $table, $trigger ) { |
1074 | 1081 | $q = <<<SQL |
1075 | 1082 | SELECT 1 FROM pg_class, pg_namespace, pg_trigger |
@@ -1093,6 +1100,10 @@ discard block |
||
1093 | 1100 | return $rows; |
1094 | 1101 | } |
1095 | 1102 | |
1103 | + /** |
|
1104 | + * @param string $table |
|
1105 | + * @param string $rule |
|
1106 | + */ |
|
1096 | 1107 | public function ruleExists( $table, $rule ) { |
1097 | 1108 | $exists = $this->selectField( 'pg_rules', 'rulename', |
1098 | 1109 | [ |