@@ -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 | [ |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | /** |
| 296 | 296 | * Get an argument. |
| 297 | 297 | * @param int $argId The integer value (from zero) for the arg |
| 298 | - * @param mixed $default The default if it doesn't exist |
|
| 298 | + * @param string $default The default if it doesn't exist |
|
| 299 | 299 | * @return mixed |
| 300 | 300 | */ |
| 301 | 301 | protected function getArg( $argId = 0, $default = null ) { |
@@ -1346,6 +1346,7 @@ discard block |
||
| 1346 | 1346 | * Unlock and lock again |
| 1347 | 1347 | * Since the lock is low-priority, queued reads will be able to complete |
| 1348 | 1348 | * @param Database &$db |
| 1349 | + * @param Database $db |
|
| 1349 | 1350 | */ |
| 1350 | 1351 | private function relockSearchindex( $db ) { |
| 1351 | 1352 | $this->unlockSearchindex( $db ); |
@@ -1507,7 +1508,7 @@ discard block |
||
| 1507 | 1508 | * is the width (number of columns) and the second element is the height |
| 1508 | 1509 | * (number of rows). |
| 1509 | 1510 | * |
| 1510 | - * @return array |
|
| 1511 | + * @return integer[] |
|
| 1511 | 1512 | */ |
| 1512 | 1513 | public static function getTermSize() { |
| 1513 | 1514 | $default = [ 80, 50 ]; |
@@ -28,31 +28,6 @@ |
||
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * @param array $config Configuration options |
| 31 | - * @param string $config['inputFormat'] Date format string to use for the textual input field. |
|
| 32 | - * Displayed while the widget is active, and the user can type in a date in this format. |
|
| 33 | - * Should be short and easy to type. (default: 'YYYY-MM-DD' or 'YYYY-MM', depending on |
|
| 34 | - * `precision`) |
|
| 35 | - * @param string $config['displayFormat'] Date format string to use for the clickable label. |
|
| 36 | - * while the widget is inactive. Should be as unambiguous as possible (for example, prefer |
|
| 37 | - * to spell out the month, rather than rely on the order), even if that makes it longer. |
|
| 38 | - * Applicable only if the widget is infused. (default: language-specific) |
|
| 39 | - * @param string $config['placeholderLabel'] Placeholder text shown when the widget is not |
|
| 40 | - * selected. Applicable only if the widget is infused. (default: taken from message |
|
| 41 | - * `mw-widgets-dateinput-no-date`) |
|
| 42 | - * @param string $config['placeholderDateFormat'] User-visible date format string displayed |
|
| 43 | - * in the textual input field when it's empty. Should be the same as `inputFormat`, but |
|
| 44 | - * translated to the user's language. (default: 'YYYY-MM-DD' or 'YYYY-MM', depending on |
|
| 45 | - * `precision`) |
|
| 46 | - * @param string $config['precision'] Date precision to use, 'day' or 'month' (default: 'day') |
|
| 47 | - * @param string $config['mustBeAfter'] Validates the date to be after this. |
|
| 48 | - * In the 'YYYY-MM-DD' or 'YYYY-MM' format, depending on `precision`. |
|
| 49 | - * @param string $config['mustBeBefore'] Validates the date to be before this. |
|
| 50 | - * In the 'YYYY-MM-DD' or 'YYYY-MM' format, depending on `precision`. |
|
| 51 | - * @param string $config['overlay'] The jQuery selector for the overlay layer on which to render |
|
| 52 | - * the calendar. This configuration is useful in cases where the expanded calendar is larger |
|
| 53 | - * than its container. The specified overlay layer is usually on top of the container and has |
|
| 54 | - * a larger area. Applicable only if the widget is infused. By default, the calendar uses |
|
| 55 | - * relative positioning. |
|
| 56 | 31 | */ |
| 57 | 32 | public function __construct( array $config = [] ) { |
| 58 | 33 | $config = array_merge( [ |
@@ -184,9 +184,9 @@ |
||
| 184 | 184 | /** |
| 185 | 185 | * Returns an error page, which is suitable for output to the end user via a web browser. |
| 186 | 186 | * |
| 187 | - * @param $title |
|
| 188 | - * @param $longHtml |
|
| 189 | - * @param $shortText |
|
| 187 | + * @param string $title |
|
| 188 | + * @param string $longHtml |
|
| 189 | + * @param string $shortText |
|
| 190 | 190 | * @return string |
| 191 | 191 | */ |
| 192 | 192 | function getIndexErrorOutput( $title, $longHtml, $shortText ) { |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | * Add one or more head items to the output |
| 659 | 659 | * |
| 660 | 660 | * @since 1.28 |
| 661 | - * @param string|string[] $value Raw HTML |
|
| 661 | + * @param string|string[] $values Raw HTML |
|
| 662 | 662 | */ |
| 663 | 663 | public function addHeadItems( $values ) { |
| 664 | 664 | $this->mHeadItems = array_merge( $this->mHeadItems, (array)$values ); |
@@ -975,7 +975,7 @@ discard block |
||
| 975 | 975 | /** |
| 976 | 976 | * Replace the subtitle with $str |
| 977 | 977 | * |
| 978 | - * @param string|Message $str New value of the subtitle. String should be safe HTML. |
|
| 978 | + * @param string $str New value of the subtitle. String should be safe HTML. |
|
| 979 | 979 | */ |
| 980 | 980 | public function setSubtitle( $str ) { |
| 981 | 981 | $this->clearSubtitle(); |
@@ -1593,7 +1593,7 @@ discard block |
||
| 1593 | 1593 | /** |
| 1594 | 1594 | * Set the displayed file version |
| 1595 | 1595 | * |
| 1596 | - * @param File|bool $file |
|
| 1596 | + * @param File $file |
|
| 1597 | 1597 | * @return mixed Previous value |
| 1598 | 1598 | */ |
| 1599 | 1599 | public function setFileVersion( $file ) { |
@@ -1897,7 +1897,7 @@ discard block |
||
| 1897 | 1897 | } |
| 1898 | 1898 | |
| 1899 | 1899 | /** |
| 1900 | - * @param $maxage |
|
| 1900 | + * @param integer $maxage |
|
| 1901 | 1901 | * @deprecated since 1.27 Use setCdnMaxage() instead |
| 1902 | 1902 | */ |
| 1903 | 1903 | public function setSquidMaxage( $maxage ) { |
@@ -1931,7 +1931,7 @@ discard block |
||
| 1931 | 1931 | * the TTL is higher the older the $mtime timestamp is. Essentially, the |
| 1932 | 1932 | * TTL is 90% of the age of the object, subject to the min and max. |
| 1933 | 1933 | * |
| 1934 | - * @param string|integer|float|bool|null $mtime Last-Modified timestamp |
|
| 1934 | + * @param false|string $mtime Last-Modified timestamp |
|
| 1935 | 1935 | * @param integer $minTTL Mimimum TTL in seconds [default: 1 minute] |
| 1936 | 1936 | * @param integer $maxTTL Maximum TTL in seconds [default: $wgSquidMaxage] |
| 1937 | 1937 | * @return integer TTL in seconds |
@@ -1968,7 +1968,7 @@ discard block |
||
| 1968 | 1968 | /** |
| 1969 | 1969 | * Get the list of cookies that will influence on the cache |
| 1970 | 1970 | * |
| 1971 | - * @return array |
|
| 1971 | + * @return string[] |
|
| 1972 | 1972 | */ |
| 1973 | 1973 | function getCacheVaryCookies() { |
| 1974 | 1974 | static $cookies; |
@@ -2363,7 +2363,7 @@ discard block |
||
| 2363 | 2363 | * indexing, clear the current text and redirect, set the page's title |
| 2364 | 2364 | * and optionally an custom HTML title (content of the "<title>" tag). |
| 2365 | 2365 | * |
| 2366 | - * @param string|Message $pageTitle Will be passed directly to setPageTitle() |
|
| 2366 | + * @param Message $pageTitle Will be passed directly to setPageTitle() |
|
| 2367 | 2367 | * @param string|Message $htmlTitle Will be passed directly to setHTMLTitle(); |
| 2368 | 2368 | * optional, if not passed the "<title>" attribute will be |
| 2369 | 2369 | * based on $pageTitle |
@@ -2389,8 +2389,8 @@ discard block |
||
| 2389 | 2389 | * showErrorPage( 'titlemsg', $messageObject ); |
| 2390 | 2390 | * showErrorPage( $titleMessageObject, $messageObject ); |
| 2391 | 2391 | * |
| 2392 | - * @param string|Message $title Message key (string) for page title, or a Message object |
|
| 2393 | - * @param string|Message $msg Message key (string) for page text, or a Message object |
|
| 2392 | + * @param string $title Message key (string) for page title, or a Message object |
|
| 2393 | + * @param string $msg Message key (string) for page text, or a Message object |
|
| 2394 | 2394 | * @param array $params Message parameters; ignored if $msg is a Message object |
| 2395 | 2395 | */ |
| 2396 | 2396 | public function showErrorPage( $title, $msg, $params = [] ) { |
@@ -2591,6 +2591,9 @@ discard block |
||
| 2591 | 2591 | } |
| 2592 | 2592 | } |
| 2593 | 2593 | |
| 2594 | + /** |
|
| 2595 | + * @param string $message |
|
| 2596 | + */ |
|
| 2594 | 2597 | public function showFatalError( $message ) { |
| 2595 | 2598 | $this->prepareErrorPage( $this->msg( 'internalerror' ) ); |
| 2596 | 2599 | |
@@ -2609,6 +2612,9 @@ discard block |
||
| 2609 | 2612 | $this->showFatalError( $this->msg( 'filerenameerror', $old, $new )->text() ); |
| 2610 | 2613 | } |
| 2611 | 2614 | |
| 2615 | + /** |
|
| 2616 | + * @param string $name |
|
| 2617 | + */ |
|
| 2612 | 2618 | public function showFileDeleteError( $name ) { |
| 2613 | 2619 | $this->showFatalError( $this->msg( 'filedeleteerror', $name )->text() ); |
| 2614 | 2620 | } |
@@ -2635,7 +2641,7 @@ discard block |
||
| 2635 | 2641 | * Add a "return to" link pointing to a specified title, |
| 2636 | 2642 | * or the title indicated in the request, or else the main page |
| 2637 | 2643 | * |
| 2638 | - * @param mixed $unused |
|
| 2644 | + * @param null|boolean $unused |
|
| 2639 | 2645 | * @param Title|string $returnto Title or String to return to |
| 2640 | 2646 | * @param string $returntoquery Query string for the return to link |
| 2641 | 2647 | */ |
@@ -3654,7 +3660,7 @@ discard block |
||
| 3654 | 3660 | * Caller is responsible for ensuring the file exists. Emits a PHP warning otherwise. |
| 3655 | 3661 | * |
| 3656 | 3662 | * @since 1.27 |
| 3657 | - * @param string $remotePath URL path prefix that points to $localPath |
|
| 3663 | + * @param string $remotePathPrefix URL path prefix that points to $localPath |
|
| 3658 | 3664 | * @param string $localPath File directory exposed at $remotePath |
| 3659 | 3665 | * @param string $file Path to target file relative to $localPath |
| 3660 | 3666 | * @return string URL |