From: jenkins-bot Date: Fri, 11 Aug 2017 21:32:58 +0000 (+0000) Subject: Merge "Add missing @param and @return documentation" X-Git-Tag: 1.31.0-rc.0~2408 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=cc4115e87f1ffec8f751e783ad9404782b23a0f3;hp=84b6d5c2e5be3b2fcd1808a7bb82f24a494e3426 Merge "Add missing @param and @return documentation" --- diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php index 24ae8561cc..b73ecbd8ed 100644 --- a/includes/AuthPlugin.php +++ b/includes/AuthPlugin.php @@ -359,6 +359,7 @@ class AuthPluginUser { /** * @deprecated since 1.28, use SessionManager::invalidateSessionForUser() instead. + * @return bool */ public function resetAuthToken() { # Override this! diff --git a/includes/FauxRequest.php b/includes/FauxRequest.php index 9147240ac4..2f7f75b4d7 100644 --- a/includes/FauxRequest.php +++ b/includes/FauxRequest.php @@ -152,6 +152,7 @@ class FauxRequest extends WebRequest { /** * @since 1.25 + * @param string $url */ public function setRequestURL( $url ) { $this->requestUrl = $url; @@ -160,6 +161,7 @@ class FauxRequest extends WebRequest { /** * @since 1.25 MWException( "getRequestURL not implemented" ) * no longer thrown. + * @return string */ public function getRequestURL() { if ( $this->requestUrl === null ) { diff --git a/includes/Linker.php b/includes/Linker.php index 34cc49aaf9..d55f0e0bb5 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -154,6 +154,11 @@ class Linker { * @since 1.16.3 * @deprecated since 1.28, use MediaWiki\Linker\LinkRenderer instead * @see Linker::link + * @param Title $target + * @param string $html + * @param array $customAttribs + * @param array $query + * @param string|array $options * @return string */ public static function linkKnown( diff --git a/includes/OutputPage.php b/includes/OutputPage.php index fd002d1880..2a3a7cd147 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -571,6 +571,7 @@ class OutputPage extends ContextSource { * @param bool $filter Whether to filter out insufficiently trustworthy modules * @param string|null $position If not null, only return modules with this position * @param string $param + * @param string $type * @return array Array of module names */ public function getModules( $filter = false, $position = null, $param = 'mModules', diff --git a/includes/Preferences.php b/includes/Preferences.php index 48eaaf2f0b..039d99c830 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1122,6 +1122,9 @@ class Preferences { /** * Dummy, kept for backwards-compatibility. + * @param User $user + * @param IContextSource $context + * @param array &$defaultPreferences */ static function miscPreferences( $user, IContextSource $context, &$defaultPreferences ) { } diff --git a/includes/Title.php b/includes/Title.php index 1fd1073531..05f85fa47d 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1896,6 +1896,8 @@ class Title implements LinkTarget { * protocol-relative, the URL will be expanded to http:// * * @see self::getLocalURL for the arguments. + * @param string $query + * @param string|bool $query2 * @return string The URL */ public function getInternalURL( $query = '', $query2 = false ) { diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index 64c5555890..f1233639fe 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -426,6 +426,7 @@ class RecentChange { * @since 1.22 * @deprecated since 1.29 Use RCFeed::factory() instead * @param string $uri URI to get the engine object for + * @param array $params * @return RCFeedEngine The engine object * @throws MWException */ diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 608e7bb224..fa981247c2 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -1328,6 +1328,7 @@ class ChangeTags { * * @see listSoftwareDefinedTags * @deprecated since 1.28 + * @return array */ public static function listExtensionDefinedTags() { wfDeprecated( __METHOD__, '1.28' ); diff --git a/includes/export/WikiExporter.php b/includes/export/WikiExporter.php index d512654168..e0ebaa2411 100644 --- a/includes/export/WikiExporter.php +++ b/includes/export/WikiExporter.php @@ -253,6 +253,7 @@ class WikiExporter { /** * @param string $cond + * @param bool $orderRevs * @throws MWException * @throws Exception */ diff --git a/includes/libs/filebackend/SwiftFileBackend.php b/includes/libs/filebackend/SwiftFileBackend.php index 5d7795dcb3..eb72edc2ed 100644 --- a/includes/libs/filebackend/SwiftFileBackend.php +++ b/includes/libs/filebackend/SwiftFileBackend.php @@ -69,7 +69,7 @@ class SwiftFileBackend extends FileBackendStore { /** * @see FileBackendStore::__construct() - * Additional $config params include: + * @param array $config Params include: * - swiftAuthUrl : Swift authentication server URL * - swiftUser : Swift user used by MediaWiki (account:username) * - swiftKey : Swift authentication key for the above user diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index 502fce3ee7..2f721813e8 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -304,8 +304,10 @@ abstract class MediaHandler { } /** - * @deprecated since 1.30, use MediaHandler::getContentHeaders instead - */ + * @deprecated since 1.30, use MediaHandler::getContentHeaders instead + * @param array $metadata + * @return array + */ public function getStreamHeaders( $metadata ) { wfDeprecated( __METHOD__, '1.30' ); return $this->getContentHeaders( $metadata ); diff --git a/includes/media/WebP.php b/includes/media/WebP.php index 541cac234c..3e4731ae08 100644 --- a/includes/media/WebP.php +++ b/includes/media/WebP.php @@ -118,6 +118,7 @@ class WebPHandler extends BitmapHandler { /** * Extracts the image size and WebP type from a file based on the chunk list * @param array $chunks Chunks as extracted by RiffExtractor + * @param string $filename * @return array Header data array with entries 'compression', 'width' and 'height', where * 'compression' can be 'lossy', 'lossless', 'animated' or 'unknown' */ diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 3e78488803..1b9ee6c5db 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -566,6 +566,7 @@ abstract class SearchEngine { /** * Process completion search results. * Resolves the titles and rescores. + * @param string $search * @param SearchSuggestionSet $suggestions * @return SearchSuggestionSet */ diff --git a/includes/search/SearchHighlighter.php b/includes/search/SearchHighlighter.php index 6135395aeb..20462cf133 100644 --- a/includes/search/SearchHighlighter.php +++ b/includes/search/SearchHighlighter.php @@ -32,6 +32,7 @@ class SearchHighlighter { /** * @warning If you pass false to this constructor, then * the caller is responsible for HTML escaping. + * @param bool $cleanupWikitext */ function __construct( $cleanupWikitext = true ) { $this->mCleanWikitext = $cleanupWikitext; diff --git a/includes/session/Token.php b/includes/session/Token.php index 523e0cc1c0..14d239d5a9 100644 --- a/includes/session/Token.php +++ b/includes/session/Token.php @@ -56,7 +56,7 @@ class Token { * be able to extract the timestamp. * * @param string $token - * @param int|null + * @return int|null */ public static function getTimestamp( $token ) { $suffixLen = strlen( self::SUFFIX ); diff --git a/includes/specialpage/LoginSignupSpecialPage.php b/includes/specialpage/LoginSignupSpecialPage.php index 3ed131ec86..04d391b3db 100644 --- a/includes/specialpage/LoginSignupSpecialPage.php +++ b/includes/specialpage/LoginSignupSpecialPage.php @@ -1247,6 +1247,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage { /** * Returns a string that can be appended to the URL (without encoding) to preserve the * return target. Does not include leading '?'/'&'. + * @return string */ protected function getReturnToQueryStringFragment() { $returnto = ''; @@ -1340,6 +1341,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage { /** * @param array &$formDescriptor + * @param array $requests */ protected function postProcessFormDescriptor( &$formDescriptor, $requests ) { // Pre-fill username (if not creating an account, T46775). @@ -1395,6 +1397,11 @@ class FakeAuthTemplate extends BaseTemplate { /** * Extensions (AntiSpoof and TitleBlacklist) call this in response to * UserCreateForm hook to add checkboxes to the create account form. + * @param string $name + * @param string $value + * @param string $type + * @param string $msg + * @param string|bool $helptext */ public function addInputItem( $name, $value, $type, $msg, $helptext = false ) { // use the same indexes as UserCreateForm just in case someone adds an item manually @@ -1496,6 +1503,7 @@ class LoginForm extends SpecialPage { /** * @deprecated since 1.27 - call LoginHelper::getValidErrorMessages instead. + * @return array */ public static function getValidErrorMessages() { return LoginHelper::getValidErrorMessages(); @@ -1503,6 +1511,8 @@ class LoginForm extends SpecialPage { /** * @deprecated since 1.27 - don't use LoginForm, use AuthManager instead + * @param string $username + * @return array|false */ public static function incrementLoginThrottle( $username ) { wfDeprecated( __METHOD__, "1.27" ); @@ -1514,6 +1524,8 @@ class LoginForm extends SpecialPage { /** * @deprecated since 1.27 - don't use LoginForm, use AuthManager instead + * @param string $username + * @return bool|int */ public static function incLoginThrottle( $username ) { wfDeprecated( __METHOD__, "1.27" ); @@ -1523,6 +1535,8 @@ class LoginForm extends SpecialPage { /** * @deprecated since 1.27 - don't use LoginForm, use AuthManager instead + * @param string $username + * @return void */ public static function clearLoginThrottle( $username ) { wfDeprecated( __METHOD__, "1.27" ); @@ -1559,6 +1573,7 @@ class LoginForm extends SpecialPage { /** * @deprecated since 1.27 - don't use LoginForm, use AuthManager instead + * @return string */ public static function getCreateaccountToken() { wfDeprecated( __METHOD__, '1.27' ); diff --git a/includes/specials/SpecialMediaStatistics.php b/includes/specials/SpecialMediaStatistics.php index 1312501577..1789bb2bda 100644 --- a/includes/specials/SpecialMediaStatistics.php +++ b/includes/specials/SpecialMediaStatistics.php @@ -63,6 +63,7 @@ class MediaStatisticsPage extends QueryPage { * come out of querycache table is the order they went in. Which is hacky. * However, other special pages like Special:Deadendpages and * Special:BrokenRedirects also rely on this. + * @return array */ public function getQueryInfo() { $dbr = wfGetDB( DB_REPLICA ); @@ -251,6 +252,7 @@ class MediaStatisticsPage extends QueryPage { * Output the start of the table * * Including opening , and first with column headers. + * @param string $mediaType */ protected function outputTableStart( $mediaType ) { $this->getOutput()->addHTML( diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 7feee85e38..2ee40a886c 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -1496,6 +1496,7 @@ abstract class UploadBase { * @param string $type PUBLIC or SYSTEM * @param string $publicId The well-known public identifier for the dtd * @param string $systemId The url for the external dtd + * @return bool|array */ public static function checkSvgExternalDTD( $type, $publicId, $systemId ) { // This doesn't include the XHTML+MathML+SVG doctype since we don't @@ -1521,6 +1522,7 @@ abstract class UploadBase { * @todo Replace this with a whitelist filter! * @param string $element * @param array $attribs + * @param array $data * @return bool */ public function checkSvgScriptCallback( $element, $attribs, $data = null ) { diff --git a/phpcs.xml b/phpcs.xml index b1ad8d29ed..2831a2b6e5 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -3,11 +3,7 @@ - - - -