From 1fc8d79ac61947b9529277b3e46d5b86e209a610 Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Tue, 27 Oct 2020 18:13:40 +0100 Subject: [PATCH] Remove documentation that literally repeats the code For example, documenting the method getUser() with "get the User object" does not add any information that's not already there. But I have to read the text first to understand that it doesn't document anything that's not already obvious from the code. Some of this is from a time when we had a PHPCS sniff that was complaining when a line like `@param User $user` doesn't end with some descriptive text. Some users started adding text like `@param User $user The User` back then. Let's please remove this. Change-Id: I0ea8d051bc732466c73940de9259f87ffb86ce7a --- includes/EditPage.php | 7 +------ includes/GlobalFunctions.php | 2 +- includes/Hook/BeforeInitializeHook.php | 2 +- includes/Hook/FileDeleteCompleteHook.php | 2 +- includes/OutputPage.php | 2 -- includes/Rest/ResponseInterface.php | 2 +- includes/Revision.php | 2 -- includes/WebRequest.php | 2 -- includes/api/ApiBase.php | 3 --- includes/api/ApiContinuationManager.php | 1 - includes/api/ApiHelpParamValueMessage.php | 1 - includes/api/ApiMain.php | 2 -- includes/api/ApiQueryBase.php | 2 +- includes/api/ApiQueryRevisionsBase.php | 2 +- includes/api/ApiResult.php | 1 - includes/api/Hook/APIAfterExecuteHook.php | 2 +- includes/api/Hook/APIGetAllowedParamsHook.php | 2 +- includes/api/Hook/APIGetDescriptionMessagesHook.php | 2 +- includes/api/Hook/APIGetParamDescriptionMessagesHook.php | 2 +- includes/api/Hook/APIHelpModifyOutputHook.php | 2 +- includes/api/Hook/APIQueryAfterExecuteHook.php | 2 +- includes/api/Hook/APIQueryGeneratorAfterExecuteHook.php | 2 +- includes/api/Hook/ApiCheckCanExecuteHook.php | 2 +- includes/api/SearchApi.php | 2 +- .../auth/AbstractPasswordPrimaryAuthenticationProvider.php | 1 - includes/auth/AuthManager.php | 1 - includes/auth/AuthenticationProvider.php | 1 - includes/block/DatabaseBlock.php | 4 ---- includes/block/Restriction/PageRestriction.php | 4 ---- includes/cache/Hook/HtmlCacheUpdaterAppendUrlsHook.php | 2 +- includes/content/ContentModelChange.php | 4 ---- includes/content/MessageContent.php | 4 ++-- includes/content/WikiTextStructure.php | 3 --- includes/content/WikitextContentHandler.php | 1 - includes/db/CloneDatabase.php | 3 --- includes/diff/DifferenceEngine.php | 3 --- includes/filebackend/FileBackendGroup.php | 2 -- includes/filerepo/file/MediaFileTrait.php | 2 +- includes/gallery/ImageGalleryBase.php | 1 - includes/htmlform/HTMLForm.php | 1 - includes/http/MWHttpRequest.php | 1 - includes/language/ILanguageConverter.php | 1 - includes/logging/LogPage.php | 4 ++-- includes/page/Article.php | 3 --- includes/page/WikiPage.php | 2 +- includes/parser/Hook/ParserBeforePreprocessHook.php | 2 +- includes/parser/PPFrame_Hash.php | 4 ---- includes/parser/Parser.php | 4 ---- includes/parser/ParserOptions.php | 2 -- includes/registration/VersionChecker.php | 2 -- includes/resourceloader/ResourceLoaderFileModule.php | 1 - includes/search/SearchIndexFieldDefinition.php | 3 --- includes/search/SearchSuggestion.php | 2 -- includes/session/CookieSessionProvider.php | 1 - includes/session/Session.php | 5 ----- includes/session/SessionBackend.php | 2 -- includes/session/SessionId.php | 2 -- includes/session/SessionManager.php | 2 -- includes/session/SessionProvider.php | 1 - includes/skins/Skin.php | 6 +----- includes/sparql/SparqlClient.php | 3 --- includes/specialpage/ChangesListSpecialPage.php | 3 --- .../specialpage/Hook/ChangeAuthenticationDataAuditHook.php | 3 +-- includes/specials/Hook/NewPagesLineEndingHook.php | 2 +- .../Hook/SpecialContributions__formatRow__flagsHook.php | 2 +- includes/specials/Hook/SpecialMovepageAfterMoveHook.php | 6 +++--- includes/specials/Hook/SpecialStatsAddExtraHook.php | 2 +- .../SpecialTrackingCategories__generateCatLinkHook.php | 2 +- .../Hook/SpecialTrackingCategories__preprocessHook.php | 2 +- includes/specials/Hook/SpecialUploadCompleteHook.php | 2 +- includes/specials/SpecialPreferences.php | 4 ++-- includes/specials/SpecialWatchlist.php | 3 --- includes/user/BotPassword.php | 5 ----- .../user/Hook/UserGetEmailAuthenticationTimestampHook.php | 2 +- includes/user/Hook/UserGetEmailHook.php | 2 +- includes/user/Hook/UserIsBlockedGloballyHook.php | 2 +- includes/user/Hook/UserIsBotHook.php | 2 +- includes/user/Hook/UserLoadOptionsHook.php | 2 +- .../user/Hook/UserSetEmailAuthenticationTimestampHook.php | 2 +- includes/user/Hook/UserSetEmailHook.php | 2 +- includes/utils/AutoloadGenerator.php | 2 -- languages/Language.php | 2 -- languages/LanguageConverter.php | 1 - maintenance/includes/Maintenance.php | 1 - tests/phpunit/MediaWikiIntegrationTestCase.php | 3 --- tests/phpunit/includes/StatusTest.php | 4 ---- tests/phpunit/includes/TestUserRegistry.php | 2 -- tests/phpunit/includes/api/ApiChangeContentModelTest.php | 3 --- tests/phpunit/includes/api/ApiTestContext.php | 2 +- .../includes/api/Validator/ApiParamValidatorTest.php | 4 ++-- tests/phpunit/includes/parser/SanitizerTest.php | 3 --- tests/phpunit/unit/includes/FactoryArgTestTrait.php | 2 +- 92 files changed, 48 insertions(+), 172 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 6227fa82a27..d2955b2da69 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -514,9 +514,7 @@ class EditPage implements IEditObject { } /** - * Set the context Title object - * - * @param Title|null $title Title object or null + * @param Title|null $title */ public function setContextTitle( $title ) { $this->mContextTitle = $title; @@ -3822,9 +3820,6 @@ ERROR; $this->context->getOutput()->addHTML( '
' . $difftext . '
' ); } - /** - * Show the header copyright warning. - */ protected function showHeaderCopyrightWarning() { $msg = 'editpage-head-copy-warn'; if ( !$this->context->msg( $msg )->isDisabled() ) { diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 9a73117eac1..a1d654aed21 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -198,7 +198,7 @@ function wfMergeErrorArrays( ...$args ) { /** * Insert array into another array after the specified *KEY* * - * @param array $array The array. + * @param array $array * @param array $insert The array to insert. * @param mixed $after The key to insert after. Callers need to make sure the key is set. * @return array diff --git a/includes/Hook/BeforeInitializeHook.php b/includes/Hook/BeforeInitializeHook.php index 0a2831676fc..f1973eed8e5 100644 --- a/includes/Hook/BeforeInitializeHook.php +++ b/includes/Hook/BeforeInitializeHook.php @@ -22,7 +22,7 @@ interface BeforeInitializeHook { * @since 1.35 * * @param Title $title Title being used for request - * @param null $unused Null + * @param null $unused * @param OutputPage $output * @param User $user * @param WebRequest $request diff --git a/includes/Hook/FileDeleteCompleteHook.php b/includes/Hook/FileDeleteCompleteHook.php index f4a077b9eef..15e5218d9d1 100644 --- a/includes/Hook/FileDeleteCompleteHook.php +++ b/includes/Hook/FileDeleteCompleteHook.php @@ -24,7 +24,7 @@ interface FileDeleteCompleteHook { * @param WikiFilePage $article In case all revisions of the file are deleted, a reference to * the WikiFilePage associated with the file * @param User $user User who performed the deletion - * @param string $reason Reason + * @param string $reason * @return bool|void True or no return value to continue or false to abort */ public function onFileDeleteComplete( $file, $oldimage, $article, $user, diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 4a93e39e7cf..5242777bd2f 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1114,8 +1114,6 @@ class OutputPage extends ContextSource { } /** - * Get the subtitle - * * @return string */ public function getSubtitle() { diff --git a/includes/Rest/ResponseInterface.php b/includes/Rest/ResponseInterface.php index 01bd820c2e7..05374147fc6 100644 --- a/includes/Rest/ResponseInterface.php +++ b/includes/Rest/ResponseInterface.php @@ -229,7 +229,7 @@ interface ResponseInterface { * * The body MUST be a StreamInterface object. * - * @param StreamInterface $body Body. + * @param StreamInterface $body * @throws \InvalidArgumentException When the body is not valid. */ public function setBody( StreamInterface $body ); diff --git a/includes/Revision.php b/includes/Revision.php index 6c1ea717850..ba9981b41b0 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -485,8 +485,6 @@ class Revision implements IDBAccessObject { } /** - * Set the user ID/name - * * This should only be used for proposed revisions that turn out to be null edits * * @note Only supported on Revisions that were constructed based on associative arrays, diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 21e331f9ca5..0c52e62e462 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -1152,8 +1152,6 @@ class WebRequest { } /** - * Set session data - * * @note Prefer $this->getSession() instead if making multiple calls. * @param string $key Name of key in the session * @param mixed $data diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 63512f0c628..b1ce3ce0cf6 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -572,7 +572,6 @@ abstract class ApiBase extends ContextSource { } /** - * Get the error formatter * @stable to override * @return ApiErrorFormatter */ @@ -600,7 +599,6 @@ abstract class ApiBase extends ContextSource { } /** - * Get the continuation manager * @return ApiContinuationManager|null */ public function getContinuationManager() { @@ -614,7 +612,6 @@ abstract class ApiBase extends ContextSource { } /** - * Set the continuation manager * @param ApiContinuationManager|null $manager */ public function setContinuationManager( ApiContinuationManager $manager = null ) { diff --git a/includes/api/ApiContinuationManager.php b/includes/api/ApiContinuationManager.php index 9d3fd390a45..5ae6164031b 100644 --- a/includes/api/ApiContinuationManager.php +++ b/includes/api/ApiContinuationManager.php @@ -98,7 +98,6 @@ class ApiContinuationManager { } /** - * Is the generator done? * @return bool */ public function isGeneratorDone() { diff --git a/includes/api/ApiHelpParamValueMessage.php b/includes/api/ApiHelpParamValueMessage.php index 828293c3b42..01975a61f12 100644 --- a/includes/api/ApiHelpParamValueMessage.php +++ b/includes/api/ApiHelpParamValueMessage.php @@ -90,7 +90,6 @@ class ApiHelpParamValueMessage extends Message { } /** - * Fetch the message. * @return string */ public function fetchMessage() { diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 2d302bbc73b..05c484691db 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -384,7 +384,6 @@ class ApiMain extends ApiBase { } /** - * Get the continuation manager * @return ApiContinuationManager|null */ public function getContinuationManager() { @@ -392,7 +391,6 @@ class ApiMain extends ApiBase { } /** - * Set the continuation manager * @param ApiContinuationManager|null $manager */ public function setContinuationManager( ApiContinuationManager $manager = null ) { diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 46afe5fafdb..14a06c6d0ed 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -306,7 +306,7 @@ abstract class ApiQueryBase extends ApiBase { * @since 1.33 * @param string $table Table name * @param string $field Field name - * @param int[] $ids IDs + * @param int[] $ids * @return int Count of IDs actually included */ protected function addWhereIDsFld( $table, $field, $ids ) { diff --git a/includes/api/ApiQueryRevisionsBase.php b/includes/api/ApiQueryRevisionsBase.php index 24a29947c16..a7342b4acea 100644 --- a/includes/api/ApiQueryRevisionsBase.php +++ b/includes/api/ApiQueryRevisionsBase.php @@ -231,7 +231,7 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase { * Extract information from the RevisionRecord * * @since 1.32, takes a RevisionRecord instead of a Revision - * @param RevisionRecord $revision Revision + * @param RevisionRecord $revision * @param object $row Should have a field 'ts_tags' if $this->fld_tags is set * @return array */ diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index 92e7dd89185..97c1e63d055 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -154,7 +154,6 @@ class ApiResult implements ApiSerializable { } /** - * Set the error formatter * @since 1.25 * @param ApiErrorFormatter $formatter */ diff --git a/includes/api/Hook/APIAfterExecuteHook.php b/includes/api/Hook/APIAfterExecuteHook.php index 20d69ba40a4..a4c80004a03 100644 --- a/includes/api/Hook/APIAfterExecuteHook.php +++ b/includes/api/Hook/APIAfterExecuteHook.php @@ -18,7 +18,7 @@ interface APIAfterExecuteHook { * * @since 1.35 * - * @param ApiBase $module Module object + * @param ApiBase $module * @return bool|void True or no return value to continue or false to abort */ public function onAPIAfterExecute( $module ); diff --git a/includes/api/Hook/APIGetAllowedParamsHook.php b/includes/api/Hook/APIGetAllowedParamsHook.php index dc0a14e54e0..4dd6cb5d9ce 100644 --- a/includes/api/Hook/APIGetAllowedParamsHook.php +++ b/includes/api/Hook/APIGetAllowedParamsHook.php @@ -17,7 +17,7 @@ interface APIGetAllowedParamsHook { * * @since 1.35 * - * @param ApiBase $module Module object + * @param ApiBase $module * @param array &$params Array of parameters * @param int $flags Zero or OR-ed flags like ApiBase::GET_VALUES_FOR_HELP * @return bool|void True or no return value to continue or false to abort diff --git a/includes/api/Hook/APIGetDescriptionMessagesHook.php b/includes/api/Hook/APIGetDescriptionMessagesHook.php index cdcf035e422..e094f695afb 100644 --- a/includes/api/Hook/APIGetDescriptionMessagesHook.php +++ b/includes/api/Hook/APIGetDescriptionMessagesHook.php @@ -18,7 +18,7 @@ interface APIGetDescriptionMessagesHook { * * @since 1.35 * - * @param ApiBase $module Module object + * @param ApiBase $module * @param Message[] &$msg Array of Message objects * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/api/Hook/APIGetParamDescriptionMessagesHook.php b/includes/api/Hook/APIGetParamDescriptionMessagesHook.php index f46736f2c1c..f315cd2b809 100644 --- a/includes/api/Hook/APIGetParamDescriptionMessagesHook.php +++ b/includes/api/Hook/APIGetParamDescriptionMessagesHook.php @@ -18,7 +18,7 @@ interface APIGetParamDescriptionMessagesHook { * * @since 1.35 * - * @param ApiBase $module Module object + * @param ApiBase $module * @param Message[][] &$msg Array of arrays of Message objects * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/api/Hook/APIHelpModifyOutputHook.php b/includes/api/Hook/APIHelpModifyOutputHook.php index ac9b64f0c37..c46d9eadee0 100644 --- a/includes/api/Hook/APIHelpModifyOutputHook.php +++ b/includes/api/Hook/APIHelpModifyOutputHook.php @@ -17,7 +17,7 @@ interface APIHelpModifyOutputHook { * * @since 1.35 * - * @param ApiBase $module Module object + * @param ApiBase $module * @param string[] &$help Array of HTML strings to be joined for the output * @param array $options Array of formatting options passed to ApiHelp::getHelp * @param array &$tocData If a TOC is being generated, this array has keys as anchors in diff --git a/includes/api/Hook/APIQueryAfterExecuteHook.php b/includes/api/Hook/APIQueryAfterExecuteHook.php index 39d48d0e059..397d4dea1a3 100644 --- a/includes/api/Hook/APIQueryAfterExecuteHook.php +++ b/includes/api/Hook/APIQueryAfterExecuteHook.php @@ -18,7 +18,7 @@ interface APIQueryAfterExecuteHook { * * @since 1.35 * - * @param ApiBase $module Module object + * @param ApiBase $module * @return bool|void True or no return value to continue or false to abort */ public function onAPIQueryAfterExecute( $module ); diff --git a/includes/api/Hook/APIQueryGeneratorAfterExecuteHook.php b/includes/api/Hook/APIQueryGeneratorAfterExecuteHook.php index 8b006bf400b..34500e2ab3d 100644 --- a/includes/api/Hook/APIQueryGeneratorAfterExecuteHook.php +++ b/includes/api/Hook/APIQueryGeneratorAfterExecuteHook.php @@ -19,7 +19,7 @@ interface APIQueryGeneratorAfterExecuteHook { * * @since 1.35 * - * @param ApiBase $module Module object + * @param ApiBase $module * @param ApiPageSet $resultPageSet * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/api/Hook/ApiCheckCanExecuteHook.php b/includes/api/Hook/ApiCheckCanExecuteHook.php index eaa34136e00..b91bd6bc575 100644 --- a/includes/api/Hook/ApiCheckCanExecuteHook.php +++ b/includes/api/Hook/ApiCheckCanExecuteHook.php @@ -21,7 +21,7 @@ interface ApiCheckCanExecuteHook { * * @since 1.35 * - * @param ApiBase $module Module object + * @param ApiBase $module * @param User $user Current user * @param IApiMessage|Message|string|array &$message API message to die with. * Specific values accepted depend on the MediaWiki version: diff --git a/includes/api/SearchApi.php b/includes/api/SearchApi.php index 6f46c565cd3..76e422b2f74 100644 --- a/includes/api/SearchApi.php +++ b/includes/api/SearchApi.php @@ -148,7 +148,7 @@ trait SearchApi { * - search engine profiles defined by SearchApi::getSearchProfileParams() * @param string[]|null $params API request params (must be sanitized by * ApiBase::extractRequestParams() before) - * @return SearchEngine the search engine + * @return SearchEngine */ public function buildSearchEngine( array $params = null ) { if ( $params != null ) { diff --git a/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php b/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php index 09ff47a1322..948fd389105 100644 --- a/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php +++ b/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php @@ -51,7 +51,6 @@ abstract class AbstractPasswordPrimaryAuthenticationProvider } /** - * Get the PasswordFactory * @return PasswordFactory */ protected function getPasswordFactory() { diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index 2aac4c941b0..9937ccd1a7f 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -2371,7 +2371,6 @@ class AuthManager implements LoggerAwareInterface { } /** - * Get the configuration * @return array */ private function getConfiguration() { diff --git a/includes/auth/AuthenticationProvider.php b/includes/auth/AuthenticationProvider.php index 365f21bfe05..ad1264f5207 100644 --- a/includes/auth/AuthenticationProvider.php +++ b/includes/auth/AuthenticationProvider.php @@ -52,7 +52,6 @@ interface AuthenticationProvider extends LoggerAwareInterface { public function setConfig( Config $config ); /** - * Set the HookContainer * @param HookContainer $hookContainer */ public function setHookContainer( HookContainer $hookContainer ); diff --git a/includes/block/DatabaseBlock.php b/includes/block/DatabaseBlock.php index f303835c4e4..6019fa78ecf 100644 --- a/includes/block/DatabaseBlock.php +++ b/includes/block/DatabaseBlock.php @@ -1089,8 +1089,6 @@ class DatabaseBlock extends AbstractBlock { } /** - * Get Restrictions. - * * Getting the restrictions will perform a database query if the restrictions * are not already loaded. * @@ -1121,8 +1119,6 @@ class DatabaseBlock extends AbstractBlock { } /** - * Set Restrictions. - * * @since 1.33 * @param Restriction[] $restrictions * @return self diff --git a/includes/block/Restriction/PageRestriction.php b/includes/block/Restriction/PageRestriction.php index 0d8d583716f..f923f7ea9b2 100644 --- a/includes/block/Restriction/PageRestriction.php +++ b/includes/block/Restriction/PageRestriction.php @@ -51,8 +51,6 @@ class PageRestriction extends AbstractRestriction { } /** - * Set the title. - * * @since 1.33 * @param \Title $title * @return self @@ -64,8 +62,6 @@ class PageRestriction extends AbstractRestriction { } /** - * Get Title. - * * @since 1.33 * @return \Title|null */ diff --git a/includes/cache/Hook/HtmlCacheUpdaterAppendUrlsHook.php b/includes/cache/Hook/HtmlCacheUpdaterAppendUrlsHook.php index f3ea759a66f..114c67af7df 100644 --- a/includes/cache/Hook/HtmlCacheUpdaterAppendUrlsHook.php +++ b/includes/cache/Hook/HtmlCacheUpdaterAppendUrlsHook.php @@ -24,7 +24,7 @@ interface HtmlCacheUpdaterAppendUrlsHook { * @since 1.35 * * @param Title $title Title of the page being updated - * @param int $mode Mode + * @param int $mode * @param array &$append Append URLs relating to the title * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/content/ContentModelChange.php b/includes/content/ContentModelChange.php index a034a8d336d..f8becb3d400 100644 --- a/includes/content/ContentModelChange.php +++ b/includes/content/ContentModelChange.php @@ -94,8 +94,6 @@ class ContentModelChange { } /** - * Set the message prefix - * * @param string $msgPrefix */ public function setMessagePrefix( $msgPrefix ) { @@ -145,8 +143,6 @@ class ContentModelChange { } /** - * Create the new content - * * @return Status */ private function createNewContent() { diff --git a/includes/content/MessageContent.php b/includes/content/MessageContent.php index 5626b549ea6..24c7987f22d 100644 --- a/includes/content/MessageContent.php +++ b/includes/content/MessageContent.php @@ -82,7 +82,7 @@ class MessageContent extends AbstractContent { * * @deprecated since 1.33 use getMessage() instead. * - * @return Message The message object. + * @return Message */ public function getNativeData() { return $this->getMessage(); @@ -93,7 +93,7 @@ class MessageContent extends AbstractContent { * * @since 1.33 * - * @return Message The message object. + * @return Message */ public function getMessage() { // NOTE: Message objects are mutable. Cloning here makes MessageContent immutable. diff --git a/includes/content/WikiTextStructure.php b/includes/content/WikiTextStructure.php index da2a3dbd23d..7c8b13e2390 100644 --- a/includes/content/WikiTextStructure.php +++ b/includes/content/WikiTextStructure.php @@ -216,7 +216,6 @@ class WikiTextStructure { } /** - * Get opening text * @return string */ public function getOpeningText() { @@ -225,7 +224,6 @@ class WikiTextStructure { } /** - * Get main text * @return string */ public function getMainText() { @@ -234,7 +232,6 @@ class WikiTextStructure { } /** - * Get auxiliary text * @return string[] */ public function getAuxiliaryText() { diff --git a/includes/content/WikitextContentHandler.php b/includes/content/WikitextContentHandler.php index 33a6ccb30de..e062d0e389a 100644 --- a/includes/content/WikitextContentHandler.php +++ b/includes/content/WikitextContentHandler.php @@ -118,7 +118,6 @@ class WikitextContentHandler extends TextContentHandler { } /** - * Get file handler * @return FileContentHandler */ protected function getFileHandler() { diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index 102939ce61e..9cb4eb30845 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -71,9 +71,6 @@ class CloneDatabase { $this->useTemporaryTables = $u; } - /** - * Clone the table structure - */ public function cloneTableStructure() { global $wgSharedTables, $wgSharedDB; foreach ( $this->tablesToClone as $tbl ) { diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 57d83755e0a..6ebfde1b4df 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -1979,9 +1979,6 @@ class DifferenceEngine extends ContextSource { return [ $oldid, $newid ]; } - /** - * Load revision IDs - */ private function loadRevisionIds() { if ( $this->mRevisionsIdsLoaded ) { return; diff --git a/includes/filebackend/FileBackendGroup.php b/includes/filebackend/FileBackendGroup.php index cd8c48c2905..a4d6ef8f41c 100644 --- a/includes/filebackend/FileBackendGroup.php +++ b/includes/filebackend/FileBackendGroup.php @@ -82,8 +82,6 @@ class FileBackendGroup { } /** - * Destroy the singleton instance - * * @deprecated since 1.35, test framework should reset services between tests instead */ public static function destroySingleton() { diff --git a/includes/filerepo/file/MediaFileTrait.php b/includes/filerepo/file/MediaFileTrait.php index 86704806380..1f5007d77ef 100644 --- a/includes/filerepo/file/MediaFileTrait.php +++ b/includes/filerepo/file/MediaFileTrait.php @@ -25,7 +25,7 @@ */ trait MediaFileTrait { /** - * @param File $file the file object + * @param File $file * @param User $user user object (for permissions check) * @param array $transforms array of transforms to include in the response * @return array response data diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index 401dd508873..ce7470e2e73 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -195,7 +195,6 @@ abstract class ImageGalleryBase extends ContextSource { } /** - * Set bad image flag * @param bool $flag */ public function setHideBadImages( $flag = true ) { diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index db721cc99fd..c233f6d5dc2 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -1634,7 +1634,6 @@ class HTMLForm extends ContextSource { } /** - * Get the title * @return Title */ public function getTitle() { diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php index e5d46e7f3fd..71185b555ae 100644 --- a/includes/http/MWHttpRequest.php +++ b/includes/http/MWHttpRequest.php @@ -282,7 +282,6 @@ abstract class MWHttpRequest implements LoggerAwareInterface { } /** - * Set the user agent * @param string $UA */ public function setUserAgent( $UA ) { diff --git a/includes/language/ILanguageConverter.php b/includes/language/ILanguageConverter.php index 12c5b25557c..fe3c400169b 100644 --- a/includes/language/ILanguageConverter.php +++ b/includes/language/ILanguageConverter.php @@ -60,7 +60,6 @@ interface ILanguageConverter { public function getPreferredVariant(); /** - * Get default variant. * This function would not be affected by user's settings * @return string The default variant code */ diff --git a/includes/logging/LogPage.php b/includes/logging/LogPage.php index ec31629a93c..eb56d09886d 100644 --- a/includes/logging/LogPage.php +++ b/includes/logging/LogPage.php @@ -222,10 +222,10 @@ class LogPage { * * @param string $type Log type * @param string $action Log action - * @param Title|null $title Title object or null + * @param Title|null $title * @param Skin|null $skin Skin object or null. If null, we want to use the wiki * content language, since that will go to the IRC feed. - * @param array $params Parameters + * @param array $params * @param bool $filterWikilinks Whether to filter wiki links * @return string HTML */ diff --git a/includes/page/Article.php b/includes/page/Article.php index d279856b5e6..e402f928b18 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -268,9 +268,6 @@ class Article implements Page { return $this->mPage; } - /** - * Clear the object - */ public function clear() { $this->mContentLoaded = false; diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 6f1de6776c2..38c454b76d7 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2020,7 +2020,7 @@ class WikiPage implements Page, IDBAccessObject { * @deprecated since 1.32, use getDerivedDataUpdater instead. * * @param Content $content - * @param Revision|RevisionRecord|null $revision Revision object. + * @param Revision|RevisionRecord|null $revision * Used with vary-revision or vary-revision-id. Passing a Revision object * is hard deprecated since 1.35; * @param User|null $user diff --git a/includes/parser/Hook/ParserBeforePreprocessHook.php b/includes/parser/Hook/ParserBeforePreprocessHook.php index 5d2d705e104..da21fb10748 100644 --- a/includes/parser/Hook/ParserBeforePreprocessHook.php +++ b/includes/parser/Hook/ParserBeforePreprocessHook.php @@ -18,7 +18,7 @@ interface ParserBeforePreprocessHook { * * @since 1.35 * - * @param Parser $parser Parser object + * @param Parser $parser * @param string &$text text to parse * @param StripState $stripState StripState instance being used * @return bool|void True or no return value to continue or false to abort diff --git a/includes/parser/PPFrame_Hash.php b/includes/parser/PPFrame_Hash.php index f3a9b508326..df591decb05 100644 --- a/includes/parser/PPFrame_Hash.php +++ b/includes/parser/PPFrame_Hash.php @@ -594,8 +594,6 @@ class PPFrame_Hash implements PPFrame { } /** - * Set the TTL - * * @param int $ttl */ public function setTTL( $ttl ) { @@ -605,8 +603,6 @@ class PPFrame_Hash implements PPFrame { } /** - * Get the TTL - * * @return int|null */ public function getTTL() { diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 53c197d4754..9eea9e11050 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1283,8 +1283,6 @@ class Parser { } /** - * Get the StripState - * * @return StripState */ public function getStripState() { @@ -3987,8 +3985,6 @@ class Parser { } /** - * Increment the expensive function count - * * @return bool False if the limit has been exceeded */ public function incrementExpensiveFunctionCount() { diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index 94d824d0075..11475624ed0 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -989,8 +989,6 @@ class ParserOptions { } /** - * Set the redirect target. - * * Note that setting or changing this does not *make* the page a redirect * or change its target, it merely records the information for reference * during the parse. diff --git a/includes/registration/VersionChecker.php b/includes/registration/VersionChecker.php index d92aee53252..1898ebd00de 100644 --- a/includes/registration/VersionChecker.php +++ b/includes/registration/VersionChecker.php @@ -114,8 +114,6 @@ class VersionChecker { } /** - * Set PHP version. - * * @param string $phpVersion Current PHP version. Must be well-formed. * @throws UnexpectedValueException */ diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index 2e333983d59..f64a542efac 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -490,7 +490,6 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { } /** - * Get the skip function. * @return null|string * @throws RuntimeException If the file doesn't exist */ diff --git a/includes/search/SearchIndexFieldDefinition.php b/includes/search/SearchIndexFieldDefinition.php index 61a41055836..196b0c3e80b 100644 --- a/includes/search/SearchIndexFieldDefinition.php +++ b/includes/search/SearchIndexFieldDefinition.php @@ -61,7 +61,6 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField { } /** - * Get index type * @return string */ public function getIndexType() { @@ -117,7 +116,6 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField { } /** - * Get subfields * @return SearchIndexFieldDefinition[] */ public function getSubfields() { @@ -125,7 +123,6 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField { } /** - * Set subfields * @param SearchIndexFieldDefinition[] $subfields * @return $this */ diff --git a/includes/search/SearchSuggestion.php b/includes/search/SearchSuggestion.php index 3505e58a387..7b5cf0229e9 100644 --- a/includes/search/SearchSuggestion.php +++ b/includes/search/SearchSuggestion.php @@ -96,7 +96,6 @@ class SearchSuggestion { } /** - * Set the suggested title * @param Title|null $title */ public function setSuggestedTitle( Title $title = null ) { @@ -116,7 +115,6 @@ class SearchSuggestion { } /** - * Set the suggested title ID * @param int|null $suggestedTitleID */ public function setSuggestedTitleID( $suggestedTitleID = null ) { diff --git a/includes/session/CookieSessionProvider.php b/includes/session/CookieSessionProvider.php index 6b787f2cc77..8f5268d0978 100644 --- a/includes/session/CookieSessionProvider.php +++ b/includes/session/CookieSessionProvider.php @@ -299,7 +299,6 @@ class CookieSessionProvider extends SessionProvider { } /** - * Set the "logged out" cookie * @param int $loggedOut timestamp * @param WebRequest $request */ diff --git a/includes/session/Session.php b/includes/session/Session.php index 2c6553f644a..f82b366c6a5 100644 --- a/includes/session/Session.php +++ b/includes/session/Session.php @@ -239,7 +239,6 @@ class Session implements \Countable, \Iterator, \ArrayAccess { } /** - * Set the "logged out" timestamp * @param int $ts */ public function setLoggedOutTimestamp( $ts ) { @@ -271,8 +270,6 @@ class Session implements \Countable, \Iterator, \ArrayAccess { } /** - * Renew the session - * * Resets the TTL in the backend store if the session is near expiring, and * re-persists the session to any active WebRequests if persistent. */ @@ -575,8 +572,6 @@ class Session implements \Countable, \Iterator, \ArrayAccess { } /** - * Save the session - * * This will update the backend data and might re-persist the session * if needed. */ diff --git a/includes/session/SessionBackend.php b/includes/session/SessionBackend.php index 8230685609f..7cf6f6dd683 100644 --- a/includes/session/SessionBackend.php +++ b/includes/session/SessionBackend.php @@ -504,7 +504,6 @@ final class SessionBackend { } /** - * Set the "logged out" timestamp * @param int|null $ts */ public function setLoggedOutTimestamp( $ts = null ) { @@ -531,7 +530,6 @@ final class SessionBackend { } /** - * Set provider metadata * @note For use by SessionProvider subclasses only * @param array|null $metadata */ diff --git a/includes/session/SessionId.php b/includes/session/SessionId.php index 97f185d4185..331639bcd4a 100644 --- a/includes/session/SessionId.php +++ b/includes/session/SessionId.php @@ -51,7 +51,6 @@ final class SessionId { } /** - * Get the ID * @return string */ public function getId() { @@ -59,7 +58,6 @@ final class SessionId { } /** - * Set the ID * @internal For use by \MediaWiki\Session\SessionManager only * @param string $id */ diff --git a/includes/session/SessionManager.php b/includes/session/SessionManager.php index 4f1bb38299e..c34d4b1d277 100644 --- a/includes/session/SessionManager.php +++ b/includes/session/SessionManager.php @@ -105,8 +105,6 @@ final class SessionManager implements SessionManagerInterface { } /** - * Get the "global" session - * * If PHP's session_id() has been set, returns that session. Otherwise * returns the session for RequestContext::getMain()->getRequest(). * diff --git a/includes/session/SessionProvider.php b/includes/session/SessionProvider.php index 9075cd28a52..7adce7fd9a8 100644 --- a/includes/session/SessionProvider.php +++ b/includes/session/SessionProvider.php @@ -140,7 +140,6 @@ abstract class SessionProvider implements SessionProviderInterface, LoggerAwareI } /** - * Set the hook container * @internal * @param HookContainer $hookContainer */ diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 5fe436b1534..8dff93d421e 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -360,7 +360,6 @@ abstract class Skin extends ContextSource { } /** - * Set the "relevant" title * @see self::getRelevantTitle() * @param Title $t */ @@ -383,7 +382,6 @@ abstract class Skin extends ContextSource { } /** - * Set the "relevant" user * @see self::getRelevantUser() * @param User $u */ @@ -1974,8 +1972,6 @@ abstract class Skin extends ContextSource { } /** - * Get the site notice - * * @return string HTML fragment */ public function getSiteNotice() { @@ -2011,7 +2007,7 @@ abstract class Skin extends ContextSource { * to be included in the link, like "§ion=$section" * @param string|null $tooltip The tooltip to use for the link: will be escaped * and wrapped in the 'editsectionhint' message - * @param Language $lang Language object + * @param Language $lang * @return string HTML to use for edit link */ public function doEditSectionLink( Title $nt, $section, $tooltip, Language $lang ) { diff --git a/includes/sparql/SparqlClient.php b/includes/sparql/SparqlClient.php index b2c2c2551ea..381430879df 100644 --- a/includes/sparql/SparqlClient.php +++ b/includes/sparql/SparqlClient.php @@ -87,7 +87,6 @@ class SparqlClient { } /** - * Set client options * @param array $options * @return $this */ @@ -105,8 +104,6 @@ class SparqlClient { } /** - * Set user agent string. - * * Mote it is not recommended to completely override user agent for * most applications. * @see appendUserAgent() for recommended way of specifying user agent. diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 428a8b0c4c1..eaea5498fc8 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -1679,9 +1679,6 @@ abstract class ChangesListSpecialPage extends SpecialPage { $this->outputChangesList( $rows, $opts ); } - /** - * Output feed links. - */ public function outputFeedLinks() { // nothing by default } diff --git a/includes/specialpage/Hook/ChangeAuthenticationDataAuditHook.php b/includes/specialpage/Hook/ChangeAuthenticationDataAuditHook.php index 91acb9cfbb6..676d486c8e1 100644 --- a/includes/specialpage/Hook/ChangeAuthenticationDataAuditHook.php +++ b/includes/specialpage/Hook/ChangeAuthenticationDataAuditHook.php @@ -19,8 +19,7 @@ interface ChangeAuthenticationDataAuditHook { * * @since 1.35 * - * @param AuthenticationRequest $req AuthenticationRequest object - * describing the change (and target user) + * @param AuthenticationRequest $req Object describing the change (and target user) * @param StatusValue $status StatusValue with the result of the action * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/specials/Hook/NewPagesLineEndingHook.php b/includes/specials/Hook/NewPagesLineEndingHook.php index 53c1896049b..f74f70144bf 100644 --- a/includes/specials/Hook/NewPagesLineEndingHook.php +++ b/includes/specials/Hook/NewPagesLineEndingHook.php @@ -18,7 +18,7 @@ interface NewPagesLineEndingHook { * * @since 1.35 * - * @param SpecialNewPages $page The SpecialNewPages object + * @param SpecialNewPages $page * @param string &$ret the HTML line * @param stdClass $row The database row for this page (the recentchanges record and a few extras * - see NewPagesPager::getQueryInfo) diff --git a/includes/specials/Hook/SpecialContributions__formatRow__flagsHook.php b/includes/specials/Hook/SpecialContributions__formatRow__flagsHook.php index 62cddbf5fda..68bfba6aaab 100644 --- a/includes/specials/Hook/SpecialContributions__formatRow__flagsHook.php +++ b/includes/specials/Hook/SpecialContributions__formatRow__flagsHook.php @@ -19,7 +19,7 @@ interface SpecialContributions__formatRow__flagsHook { * * @since 1.35 * - * @param IContextSource $context IContextSource object + * @param IContextSource $context * @param stdClass $row Revision information from the database * @param string[] &$flags HTML fragments describing flags for this row * @return bool|void True or no return value to continue or false to abort diff --git a/includes/specials/Hook/SpecialMovepageAfterMoveHook.php b/includes/specials/Hook/SpecialMovepageAfterMoveHook.php index ed23668e0f3..0d9a52abd0a 100644 --- a/includes/specials/Hook/SpecialMovepageAfterMoveHook.php +++ b/includes/specials/Hook/SpecialMovepageAfterMoveHook.php @@ -18,9 +18,9 @@ interface SpecialMovepageAfterMoveHook { * * @since 1.35 * - * @param MovePageForm $movePage MovePageForm object - * @param Title $oldTitle Old title - * @param Title $newTitle New title + * @param MovePageForm $movePage + * @param Title $oldTitle + * @param Title $newTitle * @return bool|void True or no return value to continue or false to abort */ public function onSpecialMovepageAfterMove( $movePage, $oldTitle, $newTitle ); diff --git a/includes/specials/Hook/SpecialStatsAddExtraHook.php b/includes/specials/Hook/SpecialStatsAddExtraHook.php index 75520c15b93..228eaa93db1 100644 --- a/includes/specials/Hook/SpecialStatsAddExtraHook.php +++ b/includes/specials/Hook/SpecialStatsAddExtraHook.php @@ -24,7 +24,7 @@ interface SpecialStatsAddExtraHook { * "number" is the number to be displayed. * or, can be the number to be displayed and is the * message key to use in the name column, - * @param IContextSource $context IContextSource object + * @param IContextSource $context * @return bool|void True or no return value to continue or false to abort */ public function onSpecialStatsAddExtra( &$extraStats, $context ); diff --git a/includes/specials/Hook/SpecialTrackingCategories__generateCatLinkHook.php b/includes/specials/Hook/SpecialTrackingCategories__generateCatLinkHook.php index 4bc6b9628d3..8cd0e943f65 100644 --- a/includes/specials/Hook/SpecialTrackingCategories__generateCatLinkHook.php +++ b/includes/specials/Hook/SpecialTrackingCategories__generateCatLinkHook.php @@ -19,7 +19,7 @@ interface SpecialTrackingCategories__generateCatLinkHook { * * @since 1.35 * - * @param SpecialTrackingCategories $specialPage The SpecialTrackingCategories object + * @param SpecialTrackingCategories $specialPage * @param Title $catTitle The Title object of the linked category * @param string &$html The Result html * @return bool|void True or no return value to continue or false to abort diff --git a/includes/specials/Hook/SpecialTrackingCategories__preprocessHook.php b/includes/specials/Hook/SpecialTrackingCategories__preprocessHook.php index 45c2d9e418b..360f45d6c8d 100644 --- a/includes/specials/Hook/SpecialTrackingCategories__preprocessHook.php +++ b/includes/specials/Hook/SpecialTrackingCategories__preprocessHook.php @@ -18,7 +18,7 @@ interface SpecialTrackingCategories__preprocessHook { * * @since 1.35 * - * @param SpecialTrackingCategories $specialPage The SpecialTrackingCategories object + * @param SpecialTrackingCategories $specialPage * @param array $trackingCategories Array of data from Special:TrackingCategories with msg and * cats * @return bool|void True or no return value to continue or false to abort diff --git a/includes/specials/Hook/SpecialUploadCompleteHook.php b/includes/specials/Hook/SpecialUploadCompleteHook.php index b9d71b54ea5..4260767efd9 100644 --- a/includes/specials/Hook/SpecialUploadCompleteHook.php +++ b/includes/specials/Hook/SpecialUploadCompleteHook.php @@ -17,7 +17,7 @@ interface SpecialUploadCompleteHook { * * @since 1.35 * - * @param SpecialUpload $form The SpecialUpload object + * @param SpecialUpload $form * @return bool|void True or no return value to continue or false to abort */ public function onSpecialUploadComplete( $form ); diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index 38902a90fe0..fbc76cf67d4 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -104,8 +104,8 @@ class SpecialPreferences extends SpecialPage { /** * Get the preferences form to use. - * @param User $user The user. - * @param IContextSource $context The context. + * @param User $user + * @param IContextSource $context * @return PreferencesFormOOUI|HTMLForm */ protected function getFormObject( $user, IContextSource $context ) { diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index ed677308d53..8f4427ea5b8 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -463,9 +463,6 @@ class SpecialWatchlist extends ChangesListSpecialPage { return wfGetDB( DB_REPLICA, 'watchlist' ); } - /** - * Output feed links. - */ public function outputFeedLinks() { $user = $this->getUser(); $wlToken = $user->getTokenFromOption( 'watchlisttoken' ); diff --git a/includes/user/BotPassword.php b/includes/user/BotPassword.php index 4978123f7f4..b66a20e0614 100644 --- a/includes/user/BotPassword.php +++ b/includes/user/BotPassword.php @@ -203,7 +203,6 @@ class BotPassword implements IDBAccessObject { } /** - * Get the app ID * @return string */ public function getAppId() { @@ -211,7 +210,6 @@ class BotPassword implements IDBAccessObject { } /** - * Get the token * @return string */ public function getToken() { @@ -219,7 +217,6 @@ class BotPassword implements IDBAccessObject { } /** - * Get the restrictions * @return MWRestrictions */ public function getRestrictions() { @@ -227,7 +224,6 @@ class BotPassword implements IDBAccessObject { } /** - * Get the grants * @return string[] */ public function getGrants() { @@ -244,7 +240,6 @@ class BotPassword implements IDBAccessObject { } /** - * Get the password * @return Password */ private function getPassword() { diff --git a/includes/user/Hook/UserGetEmailAuthenticationTimestampHook.php b/includes/user/Hook/UserGetEmailAuthenticationTimestampHook.php index 1aa4fd70223..18b58640478 100644 --- a/includes/user/Hook/UserGetEmailAuthenticationTimestampHook.php +++ b/includes/user/Hook/UserGetEmailAuthenticationTimestampHook.php @@ -17,7 +17,7 @@ interface UserGetEmailAuthenticationTimestampHook { * * @since 1.35 * - * @param User $user User object + * @param User $user * @param string &$timestamp Timestamp. Change this to override the local email * authentication timestamp. * @return bool|void True or no return value to continue or false to abort diff --git a/includes/user/Hook/UserGetEmailHook.php b/includes/user/Hook/UserGetEmailHook.php index e4fdfcd28bc..ae072c1c2c4 100644 --- a/includes/user/Hook/UserGetEmailHook.php +++ b/includes/user/Hook/UserGetEmailHook.php @@ -17,7 +17,7 @@ interface UserGetEmailHook { * * @since 1.35 * - * @param User $user User object + * @param User $user * @param string &$email Email, change this to override local email * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/user/Hook/UserIsBlockedGloballyHook.php b/includes/user/Hook/UserIsBlockedGloballyHook.php index f284d257ec7..c0b7cc21162 100644 --- a/includes/user/Hook/UserIsBlockedGloballyHook.php +++ b/includes/user/Hook/UserIsBlockedGloballyHook.php @@ -17,7 +17,7 @@ interface UserIsBlockedGloballyHook { * * @since 1.35 * - * @param User $user User object + * @param User $user * @param string $ip User's IP address * @param bool &$blocked Whether the user is blocked, to be modified by the hook * @param null &$block The Block object, to be modified by the hook diff --git a/includes/user/Hook/UserIsBotHook.php b/includes/user/Hook/UserIsBotHook.php index f3d9a56dbd4..58e837bf261 100644 --- a/includes/user/Hook/UserIsBotHook.php +++ b/includes/user/Hook/UserIsBotHook.php @@ -17,7 +17,7 @@ interface UserIsBotHook { * * @since 1.35 * - * @param User $user The user + * @param User $user * @param bool &$isBot Whether this is user a bot or not (boolean) * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/user/Hook/UserLoadOptionsHook.php b/includes/user/Hook/UserLoadOptionsHook.php index 208d3f7f313..d4346cd4301 100644 --- a/includes/user/Hook/UserLoadOptionsHook.php +++ b/includes/user/Hook/UserLoadOptionsHook.php @@ -17,7 +17,7 @@ interface UserLoadOptionsHook { * * @since 1.35 * - * @param User $user User object + * @param User $user * @param array &$options Options, can be modified. * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/user/Hook/UserSetEmailAuthenticationTimestampHook.php b/includes/user/Hook/UserSetEmailAuthenticationTimestampHook.php index 152be1cb95e..232906f3be4 100644 --- a/includes/user/Hook/UserSetEmailAuthenticationTimestampHook.php +++ b/includes/user/Hook/UserSetEmailAuthenticationTimestampHook.php @@ -17,7 +17,7 @@ interface UserSetEmailAuthenticationTimestampHook { * * @since 1.35 * - * @param User $user User object + * @param User $user * @param ?string &$timestamp new timestamp, change this to override local email * authentication timestamp * @return bool|void True or no return value to continue or false to abort diff --git a/includes/user/Hook/UserSetEmailHook.php b/includes/user/Hook/UserSetEmailHook.php index 778aba42d17..19cf01b8c2b 100644 --- a/includes/user/Hook/UserSetEmailHook.php +++ b/includes/user/Hook/UserSetEmailHook.php @@ -17,7 +17,7 @@ interface UserSetEmailHook { * * @since 1.35 * - * @param User $user User object + * @param User $user * @param string &$email new email, change this to override new email address * @return bool|void True or no return value to continue or false to abort */ diff --git a/includes/utils/AutoloadGenerator.php b/includes/utils/AutoloadGenerator.php index c9a5f316201..3d569555ccf 100644 --- a/includes/utils/AutoloadGenerator.php +++ b/includes/utils/AutoloadGenerator.php @@ -105,8 +105,6 @@ class AutoloadGenerator { } /** - * Set PSR4 namespaces - * * Unlike self::setExcludePaths(), this will only skip outputting the * autoloader entry when the namespace matches the path. * diff --git a/languages/Language.php b/languages/Language.php index eedb0e8aee3..427243c7d90 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -482,8 +482,6 @@ class Language { } /** - * Get the LocalisationCache instance - * * @deprecated since 1.34, use MediaWikiServices * @return LocalisationCache */ diff --git a/languages/LanguageConverter.php b/languages/LanguageConverter.php index 6f680d11986..74b7519c16a 100644 --- a/languages/LanguageConverter.php +++ b/languages/LanguageConverter.php @@ -222,7 +222,6 @@ abstract class LanguageConverter implements ILanguageConverter { } /** - * Get default variant. * This function would not be affected by user's settings * @return string The default variant code */ diff --git a/maintenance/includes/Maintenance.php b/maintenance/includes/Maintenance.php index fc8d5192c9e..7bd9916665d 100644 --- a/maintenance/includes/Maintenance.php +++ b/maintenance/includes/Maintenance.php @@ -368,7 +368,6 @@ abstract class Maintenance { } /** - * Set the batch size. * @param int $s The number of operations to do in a batch */ protected function setBatchSize( $s = 0 ) { diff --git a/tests/phpunit/MediaWikiIntegrationTestCase.php b/tests/phpunit/MediaWikiIntegrationTestCase.php index dc239239e3b..753a75fefd1 100644 --- a/tests/phpunit/MediaWikiIntegrationTestCase.php +++ b/tests/phpunit/MediaWikiIntegrationTestCase.php @@ -1492,9 +1492,6 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase { return true; } - /** - * Set up all test DBs - */ public function setupAllTestDBs() { global $wgDBprefix; diff --git a/tests/phpunit/includes/StatusTest.php b/tests/phpunit/includes/StatusTest.php index d76f5bac5bb..ae388b7ed7a 100644 --- a/tests/phpunit/includes/StatusTest.php +++ b/tests/phpunit/includes/StatusTest.php @@ -49,8 +49,6 @@ class StatusTest extends MediaWikiLangTestCase { } /** - * Test 'ok' and 'errors' getters. - * * @covers Status::__get */ public function testOkAndErrorsGetters() { @@ -71,8 +69,6 @@ class StatusTest extends MediaWikiLangTestCase { } /** - * Test 'ok' setter. - * * @covers Status::__set */ public function testOkSetter() { diff --git a/tests/phpunit/includes/TestUserRegistry.php b/tests/phpunit/includes/TestUserRegistry.php index 6fdbd14c239..d48fc092f89 100644 --- a/tests/phpunit/includes/TestUserRegistry.php +++ b/tests/phpunit/includes/TestUserRegistry.php @@ -91,8 +91,6 @@ class TestUserRegistry { } /** - * Clear the registry. - * * TestUsers created by this class will not be deleted, but any handles * to existing immutable TestUsers will be deleted, ensuring these users * are not reused. We don't reset the counter or random string by design. diff --git a/tests/phpunit/includes/api/ApiChangeContentModelTest.php b/tests/phpunit/includes/api/ApiChangeContentModelTest.php index 5145e99d86b..79f72a189c1 100644 --- a/tests/phpunit/includes/api/ApiChangeContentModelTest.php +++ b/tests/phpunit/includes/api/ApiChangeContentModelTest.php @@ -44,9 +44,6 @@ class ApiChangeContentModelTest extends ApiTestCase { ] ); } - /** - * Test title must exist - */ public function testTitleMustExist() { $name = __METHOD__; diff --git a/tests/phpunit/includes/api/ApiTestContext.php b/tests/phpunit/includes/api/ApiTestContext.php index 17dad1fac5b..60979d8ac7e 100644 --- a/tests/phpunit/includes/api/ApiTestContext.php +++ b/tests/phpunit/includes/api/ApiTestContext.php @@ -6,7 +6,7 @@ class ApiTestContext extends RequestContext { * Returns a DerivativeContext with the request variables in place * * @param WebRequest $request WebRequest request object including parameters and session - * @param User|null $user User or null + * @param User|null $user * @return DerivativeContext */ public function newTestContext( WebRequest $request, User $user = null ) { diff --git a/tests/phpunit/includes/api/Validator/ApiParamValidatorTest.php b/tests/phpunit/includes/api/Validator/ApiParamValidatorTest.php index 7a090c4b6b3..a93a461c371 100644 --- a/tests/phpunit/includes/api/Validator/ApiParamValidatorTest.php +++ b/tests/phpunit/includes/api/Validator/ApiParamValidatorTest.php @@ -530,7 +530,7 @@ class ApiParamValidatorTest extends ApiTestCase { /** * @dataProvider provideGetValue * @param string|null $data Request value - * @param mixed $settings Settings + * @param mixed $settings * @param mixed $expect Expected value, or an expected ApiUsageException */ public function testGetValue( ?string $data, $settings, $expect ) : void { @@ -598,7 +598,7 @@ class ApiParamValidatorTest extends ApiTestCase { /** * @dataProvider provideValidateValue * @param mixed $value Value to validate - * @param mixed $settings Settings + * @param mixed $settings * @param mixed $value Value to validate * @param mixed $expect Expected value, or an expected ApiUsageException */ diff --git a/tests/phpunit/includes/parser/SanitizerTest.php b/tests/phpunit/includes/parser/SanitizerTest.php index fd949c0fa0e..6d2ccc56983 100644 --- a/tests/phpunit/includes/parser/SanitizerTest.php +++ b/tests/phpunit/includes/parser/SanitizerTest.php @@ -26,9 +26,6 @@ class SanitizerTest extends MediaWikiIntegrationTestCase { } } - /** - * Provide HTML5 tags - */ public static function provideHtml5Tags() { $ESCAPED = true; # We want tag to be escaped $VERBATIM = false; # We want to keep the tag diff --git a/tests/phpunit/unit/includes/FactoryArgTestTrait.php b/tests/phpunit/unit/includes/FactoryArgTestTrait.php index 9d79d53ad94..b014c29a227 100644 --- a/tests/phpunit/unit/includes/FactoryArgTestTrait.php +++ b/tests/phpunit/unit/includes/FactoryArgTestTrait.php @@ -38,7 +38,7 @@ trait FactoryArgTestTrait { * $method is returned from getFactoryMethodName(), and $args is constructed by applying * getMockValueForParam() to the factory method's parameters. * - * @param object $factory Factory object + * @param object $factory * @return object Object created by factory */ protected function createInstanceFromFactory( $factory ) {