@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @param array $data Array of *non*-urlencoded key => value pairs, the |
| 40 | 40 | * fake GET/POST values |
| 41 | 41 | * @param bool $wasPosted Whether to treat the data as POST |
| 42 | - * @param MediaWiki\Session\Session|array|null $session Session, session |
|
| 42 | + * @param MediaWiki\Session\Session|null $session Session, session |
|
| 43 | 43 | * data array, or null |
| 44 | 44 | * @param string $protocol 'http' or 'https' |
| 45 | 45 | * @throws MWException |
@@ -126,7 +126,6 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | 128 | * @since 1.26 |
| 129 | - * @param string $name Unprefixed name of the cookie to set |
|
| 130 | 129 | * @param string|null $value Value of the cookie to set |
| 131 | 130 | * @param string|null $prefix Cookie prefix. Defaults to $wgCookiePrefix |
| 132 | 131 | */ |
@@ -152,6 +151,7 @@ discard block |
||
| 152 | 151 | |
| 153 | 152 | /** |
| 154 | 153 | * @since 1.25 |
| 154 | + * @param string $url |
|
| 155 | 155 | */ |
| 156 | 156 | public function setRequestURL( $url ) { |
| 157 | 157 | $this->requestUrl = $url; |
@@ -183,7 +183,7 @@ |
||
| 183 | 183 | * given $bootstrapConfig. In particular, all wiring files defined in the |
| 184 | 184 | * ServiceWiringFiles setting are loaded, and the MediaWikiServices hook is called. |
| 185 | 185 | * |
| 186 | - * @param Config|null $bootstrapConfig The Config object to be registered as the |
|
| 186 | + * @param Config $bootstrapConfig The Config object to be registered as the |
|
| 187 | 187 | * 'BootstrapConfig' service. This has to contain at least the information |
| 188 | 188 | * needed to set up the 'ConfigFactory' service. If not provided, any call |
| 189 | 189 | * to getBootstrapConfig(), getConfigFactory, or getMainConfig will fail. |
@@ -1356,7 +1356,7 @@ |
||
| 1356 | 1356 | * @since 1.18 |
| 1357 | 1357 | * |
| 1358 | 1358 | * @param string $key |
| 1359 | - * @param mixed $value |
|
| 1359 | + * @param string $value |
|
| 1360 | 1360 | */ |
| 1361 | 1361 | public function setExtraParam( $key, $value ) { |
| 1362 | 1362 | $this->extraParams[$key] = $value; |
@@ -1275,7 +1275,7 @@ discard block |
||
| 1275 | 1275 | * @param string|null $wikiId Id (as used by WikiMap) of the wiki to generate links to. |
| 1276 | 1276 | * For use with external changes. |
| 1277 | 1277 | * |
| 1278 | - * @return mixed|string |
|
| 1278 | + * @return string |
|
| 1279 | 1279 | */ |
| 1280 | 1280 | public static function formatComment( |
| 1281 | 1281 | $comment, $title = null, $local = false, $wikiId = null |
@@ -1803,7 +1803,7 @@ discard block |
||
| 1803 | 1803 | * Split a link trail, return the "inside" portion and the remainder of the trail |
| 1804 | 1804 | * as a two-element array |
| 1805 | 1805 | * @param string $trail |
| 1806 | - * @return array |
|
| 1806 | + * @return string[] |
|
| 1807 | 1807 | */ |
| 1808 | 1808 | static function splitTrail( $trail ) { |
| 1809 | 1809 | global $wgContLang; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | * @param string $dstPath |
| 36 | 36 | * @param bool $checkDstPath |
| 37 | - * @return string|Callable One of client, im, custom, gd, imext or an array( object, method ) |
|
| 37 | + * @return string One of client, im, custom, gd, imext or an array( object, method ) |
|
| 38 | 38 | */ |
| 39 | 39 | protected function getScalerType( $dstPath, $checkDstPath = true ) { |
| 40 | 40 | global $wgUseImageResize, $wgUseImageMagick, $wgCustomConvertCommand; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * Get ImageMagick subsampling factors for the target JPEG pixel format. |
| 109 | 109 | * |
| 110 | 110 | * @param string $pixelFormat one of 'yuv444', 'yuv422', 'yuv420' |
| 111 | - * @return array of string keys |
|
| 111 | + * @return string[] of string keys |
|
| 112 | 112 | */ |
| 113 | 113 | protected function imageMagickSubsampling( $pixelFormat ) { |
| 114 | 114 | switch ( $pixelFormat ) { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | 105 | * Fields in the oldimage table |
| 106 | - * @return array |
|
| 106 | + * @return string[] |
|
| 107 | 107 | */ |
| 108 | 108 | static function selectFields() { |
| 109 | 109 | return array( |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | 234 | * @param string $prefix |
| 235 | - * @return array |
|
| 235 | + * @return string[] |
|
| 236 | 236 | */ |
| 237 | 237 | function getCacheFields( $prefix = 'img_' ) { |
| 238 | 238 | $fields = parent::getCacheFields( $prefix ); |
@@ -2183,7 +2183,7 @@ discard block |
||
| 2183 | 2183 | * |
| 2184 | 2184 | * @param string $text |
| 2185 | 2185 | * |
| 2186 | - * @return string|bool Matching string or false |
|
| 2186 | + * @return string|false Matching string or false |
|
| 2187 | 2187 | */ |
| 2188 | 2188 | public static function matchSpamRegex( $text ) { |
| 2189 | 2189 | global $wgSpamRegex; |
@@ -2197,7 +2197,7 @@ discard block |
||
| 2197 | 2197 | * |
| 2198 | 2198 | * @param string $text |
| 2199 | 2199 | * |
| 2200 | - * @return string|bool Matching string or false |
|
| 2200 | + * @return string|false Matching string or false |
|
| 2201 | 2201 | */ |
| 2202 | 2202 | public static function matchSummarySpamRegex( $text ) { |
| 2203 | 2203 | global $wgSummarySpamRegex; |
@@ -2208,7 +2208,7 @@ discard block |
||
| 2208 | 2208 | /** |
| 2209 | 2209 | * @param string $text |
| 2210 | 2210 | * @param array $regexes |
| 2211 | - * @return bool|string |
|
| 2211 | + * @return string|false |
|
| 2212 | 2212 | */ |
| 2213 | 2213 | protected static function matchSpamRegexInternal( $text, $regexes ) { |
| 2214 | 2214 | foreach ( $regexes as $regex ) { |
@@ -2448,7 +2448,7 @@ discard block |
||
| 2448 | 2448 | * $this->allowNonTextContent to true to allow editing of non-textual |
| 2449 | 2449 | * content. |
| 2450 | 2450 | * |
| 2451 | - * @param string|null|bool $text Text to unserialize |
|
| 2451 | + * @param false|string $text Text to unserialize |
|
| 2452 | 2452 | * @return Content The content object created from $text. If $text was false |
| 2453 | 2453 | * or null, false resp. null will be returned instead. |
| 2454 | 2454 | * |
@@ -3139,6 +3139,10 @@ discard block |
||
| 3139 | 3139 | $this->showTextbox( $this->textbox2, 'wpTextbox2', [ 'tabindex' => 6, 'readonly' ] ); |
| 3140 | 3140 | } |
| 3141 | 3141 | |
| 3142 | + /** |
|
| 3143 | + * @param string $text |
|
| 3144 | + * @param string $name |
|
| 3145 | + */ |
|
| 3142 | 3146 | protected function showTextbox( $text, $name, $customAttribs = [] ) { |
| 3143 | 3147 | global $wgOut, $wgUser; |
| 3144 | 3148 | |
@@ -3168,6 +3172,9 @@ discard block |
||
| 3168 | 3172 | $wgOut->addHTML( Html::textarea( $name, $wikitext, $attribs ) ); |
| 3169 | 3173 | } |
| 3170 | 3174 | |
| 3175 | + /** |
|
| 3176 | + * @param string $previewOutput |
|
| 3177 | + */ |
|
| 3171 | 3178 | protected function displayPreviewArea( $previewOutput, $isOnTop = false ) { |
| 3172 | 3179 | global $wgOut; |
| 3173 | 3180 | $classes = []; |
@@ -3754,7 +3761,7 @@ discard block |
||
| 3754 | 3761 | } |
| 3755 | 3762 | |
| 3756 | 3763 | /** |
| 3757 | - * @return array |
|
| 3764 | + * @return Title[] |
|
| 3758 | 3765 | */ |
| 3759 | 3766 | function getTemplates() { |
| 3760 | 3767 | if ( $this->preview || $this->section != '' ) { |
@@ -3917,7 +3924,7 @@ discard block |
||
| 3917 | 3924 | * @param array $checked Array of checkbox => bool, where bool indicates the checked |
| 3918 | 3925 | * status of the checkbox |
| 3919 | 3926 | * |
| 3920 | - * @return array |
|
| 3927 | + * @return string |
|
| 3921 | 3928 | */ |
| 3922 | 3929 | public function getCheckboxes( &$tabindex, $checked ) { |
| 3923 | 3930 | global $wgUser, $wgUseMediaWikiUIEverywhere; |
@@ -3981,7 +3988,7 @@ discard block |
||
| 3981 | 3988 | * |
| 3982 | 3989 | * @param int $tabindex Current tabindex |
| 3983 | 3990 | * |
| 3984 | - * @return array |
|
| 3991 | + * @return string |
|
| 3985 | 3992 | */ |
| 3986 | 3993 | public function getEditButtons( &$tabindex ) { |
| 3987 | 3994 | $buttons = []; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @param bool $ie8Compat By default, a data URI will only be produced if it can be made short |
| 101 | 101 | * enough to fit in Internet Explorer 8 (and earlier) URI length limit (32,768 bytes). Pass |
| 102 | 102 | * `false` to remove this limitation. |
| 103 | - * @return string|bool Image contents encoded as a data URI or false. |
|
| 103 | + * @return false|string Image contents encoded as a data URI or false. |
|
| 104 | 104 | */ |
| 105 | 105 | public static function encodeImageAsDataURI( $file, $type = null, $ie8Compat = true ) { |
| 106 | 106 | // Fast-fail for files that definitely exceed the maximum data URI length |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | * @param string $contents File contents to encode. |
| 129 | 129 | * @param string $type File's MIME type. |
| 130 | 130 | * @param bool $ie8Compat See encodeImageAsDataURI(). |
| 131 | - * @return string|bool Image contents encoded as a data URI or false. |
|
| 131 | + * @return string|false Image contents encoded as a data URI or false. |
|
| 132 | 132 | */ |
| 133 | 133 | public static function encodeStringAsDataURI( $contents, $type, $ie8Compat = true ) { |
| 134 | 134 | // Try #1: Non-encoded data URI |
@@ -563,7 +563,7 @@ |
||
| 563 | 563 | * @param array $params Rotate parameters. |
| 564 | 564 | * 'rotation' clockwise rotation in degrees, allowed are multiples of 90 |
| 565 | 565 | * @since 1.24 Is non-static. From 1.21 it was static |
| 566 | - * @return bool |
|
| 566 | + * @return MediaTransformError |
|
| 567 | 567 | */ |
| 568 | 568 | public function rotate( $file, $params ) { |
| 569 | 569 | return new MediaTransformError( 'thumbnail_error', 0, 0, |