aboutsummaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/HookContainer/FauxHookHandlerArray.php4
-rw-r--r--includes/HookContainer/HookContainer.php4
-rw-r--r--includes/MediaWikiEntryPoint.php4
-rw-r--r--includes/Output/OutputPage.php10
-rw-r--r--includes/ParamValidator/TypeDef/TitleDef.php4
-rw-r--r--includes/Permissions/RateLimitSubject.php3
-rw-r--r--includes/RenameUser/Hook/RenameUserSQLHook.php2
-rw-r--r--includes/ResourceLoader/CodexModule.php2
-rw-r--r--includes/ResourceLoader/Context.php19
-rw-r--r--includes/ResourceLoader/DerivativeContext.php9
-rw-r--r--includes/ResourceLoader/FilePath.php2
-rw-r--r--includes/ResourceLoader/ImageModule.php4
-rw-r--r--includes/ResourceLoader/MessageBlobStore.php2
-rw-r--r--includes/ResourceLoader/ResourceLoader.php2
-rw-r--r--includes/ResourceLoader/SkinModule.php4
-rw-r--r--includes/ResourceLoader/StartUpModule.php2
-rw-r--r--includes/Rest/BasicAccess/BasicRequestAuthorizer.php5
-rw-r--r--includes/Rest/ConditionalHeaderUtil.php2
-rw-r--r--includes/Rest/CorsUtils.php4
-rw-r--r--includes/Rest/EntryPoint.php2
-rw-r--r--includes/Rest/Handler.php19
-rw-r--r--includes/Rest/Handler/ActionModuleBasedHandler.php2
-rw-r--r--includes/Rest/Handler/DiscoveryHandler.php1
-rw-r--r--includes/Rest/Handler/Helper/HtmlInputTransformHelper.php3
-rw-r--r--includes/Rest/Handler/Helper/HtmlMessageOutputHelper.php3
-rw-r--r--includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php6
-rw-r--r--includes/Rest/Handler/Helper/PageContentHelper.php15
-rw-r--r--includes/Rest/Handler/Helper/RevisionContentHelper.php3
-rw-r--r--includes/Rest/Handler/LanguageLinksHandler.php9
-rw-r--r--includes/Rest/Handler/MediaFileHandler.php6
-rw-r--r--includes/Rest/Handler/MediaLinksHandler.php3
-rw-r--r--includes/Rest/Handler/PageHTMLHandler.php3
-rw-r--r--includes/Rest/Handler/PageHistoryCountHandler.php3
-rw-r--r--includes/Rest/Handler/PageHistoryHandler.php3
-rw-r--r--includes/Rest/Handler/PageSourceHandler.php7
-rw-r--r--includes/Rest/Handler/ParsoidHandler.php2
-rw-r--r--includes/Rest/Handler/RevisionHTMLHandler.php3
-rw-r--r--includes/Rest/Handler/RevisionSourceHandler.php10
-rw-r--r--includes/Rest/Handler/UpdateHandler.php2
-rw-r--r--includes/Rest/HeaderParser/Origin.php4
-rw-r--r--includes/Rest/HttpException.php1
-rw-r--r--includes/Rest/Module/ExtraRoutesModule.php3
-rw-r--r--includes/Rest/Module/Module.php4
-rw-r--r--includes/Rest/Module/SpecBasedModule.php4
-rw-r--r--includes/Rest/Router.php10
-rw-r--r--includes/Rest/TokenAwareHandlerTrait.php4
-rw-r--r--includes/Rest/Validator/UnsupportedContentTypeBodyValidator.php1
-rw-r--r--includes/Revision/ArchivedRevisionLookup.php4
-rw-r--r--includes/Revision/ContributionsSegment.php10
-rw-r--r--includes/Revision/MutableRevisionRecord.php2
-rw-r--r--includes/Revision/MutableRevisionSlots.php4
-rw-r--r--includes/Revision/RevisionRecord.php4
-rw-r--r--includes/Revision/RevisionStore.php7
-rw-r--r--includes/Settings/Cache/CachedSource.php4
-rw-r--r--includes/Settings/Config/ArrayConfigBuilder.php2
-rw-r--r--includes/Settings/Config/ConfigSchemaAggregator.php2
-rw-r--r--includes/Settings/LocalSettingsLoader.php4
-rw-r--r--includes/Settings/SettingsBuilder.php9
-rw-r--r--includes/Settings/Source/EtcdSource.php10
-rw-r--r--includes/Settings/Source/FileSource.php10
-rw-r--r--includes/Settings/Source/PhpSettingsSource.php2
-rw-r--r--includes/Settings/Source/ReflectionSchemaSource.php2
-rw-r--r--includes/Storage/DerivedPageDataUpdater.php1
-rw-r--r--includes/Storage/EditResult.php10
-rw-r--r--includes/Storage/EditResultBuilder.php8
-rw-r--r--includes/Storage/PageUpdateStatus.php8
-rw-r--r--includes/Storage/PageUpdater.php17
-rw-r--r--includes/Storage/PageUpdaterFactory.php1
-rw-r--r--includes/Storage/RevertedTagUpdate.php6
-rw-r--r--includes/Storage/RevertedTagUpdateManager.php4
-rw-r--r--includes/Storage/RevisionSlotsUpdate.php4
-rw-r--r--includes/actions/ActionEntryPoint.php1
-rw-r--r--includes/actions/DeleteAction.php2
-rw-r--r--includes/api/ApiContinuationManager.php1
-rw-r--r--includes/api/ApiCreateTempUserTrait.php2
-rw-r--r--includes/api/ApiEntryPoint.php1
-rw-r--r--includes/api/ApiErrorFormatter.php1
-rw-r--r--includes/api/ApiMain.php5
-rw-r--r--includes/api/ApiOptionsBase.php2
-rw-r--r--includes/api/ApiRollback.php5
-rw-r--r--includes/api/IApiMessage.php1
-rw-r--r--includes/auth/PrimaryAuthenticationProvider.php2
-rw-r--r--includes/auth/SecondaryAuthenticationProvider.php2
-rw-r--r--includes/block/BlockCache.php2
-rw-r--r--includes/block/BlockCacheKey.php4
-rw-r--r--includes/block/BlockManager.php2
-rw-r--r--includes/block/BlockUser.php8
-rw-r--r--includes/block/DatabaseBlock.php5
-rw-r--r--includes/block/UnblockUser.php2
-rw-r--r--includes/cache/BacklinkCache.php2
-rw-r--r--includes/collation/CollationFactory.php4
-rw-r--r--includes/content/ContentHandlerFactory.php5
-rw-r--r--includes/content/Renderer/ContentRenderer.php4
-rw-r--r--includes/context/RequestContext.php2
-rw-r--r--includes/deferred/DeferredUpdatesScopeStack.php2
-rw-r--r--includes/deferred/LinksUpdate/LinksTable.php17
-rw-r--r--includes/deferred/LinksUpdate/LinksTableGroup.php6
-rw-r--r--includes/deferred/LinksUpdate/LinksUpdate.php2
-rw-r--r--includes/deferred/LinksUpdate/PageLinksTable.php1
-rw-r--r--includes/deferred/LinksUpdate/TemplateLinksTable.php1
-rw-r--r--includes/diff/TextDiffer/ManifoldTextDiffer.php4
-rw-r--r--includes/edit/ParsoidRenderID.php6
-rw-r--r--includes/edit/SelserContext.php3
-rw-r--r--includes/editpage/Constraint/AccidentalRecreationConstraint.php4
-rw-r--r--includes/editpage/Constraint/EditConstraintRunner.php10
-rw-r--r--includes/editpage/Constraint/MissingCommentConstraint.php4
-rw-r--r--includes/editpage/EditPage.php9
-rw-r--r--includes/exception/MWExceptionHandler.php1
-rw-r--r--includes/exception/MWExceptionRenderer.php2
-rw-r--r--includes/filerepo/LocalRepo.php2
-rw-r--r--includes/filerepo/file/LocalFileMoveBatch.php4
-rw-r--r--includes/filerepo/file/MetadataStorageHelper.php4
-rw-r--r--includes/htmlform/HTMLForm.php1
-rw-r--r--includes/http/MWHttpRequest.php2
-rw-r--r--includes/http/Telemetry.php8
-rw-r--r--includes/installer/Installer.php3
-rw-r--r--includes/installer/MysqlSettingsForm.php1
-rw-r--r--includes/installer/Pingback.php2
-rw-r--r--includes/installer/PostgresConnectForm.php1
-rw-r--r--includes/installer/PostgresSettingsForm.php1
-rw-r--r--includes/installer/Task/InitialContentTask.php2
-rw-r--r--includes/installer/Task/Task.php8
-rw-r--r--includes/installer/Task/TaskList.php1
-rw-r--r--includes/installer/Task/TaskRunner.php6
-rw-r--r--includes/installer/WebInstallerOptions.php6
-rw-r--r--includes/jobqueue/JobQueueDB.php1
-rw-r--r--includes/jobqueue/jobs/UploadFromUrlJob.php5
-rw-r--r--includes/jobqueue/jobs/UploadJobTrait.php10
-rw-r--r--includes/language/Language.php4
-rw-r--r--includes/language/LanguageConverter.php9
-rw-r--r--includes/language/LanguageConverterIcu.php2
-rw-r--r--includes/language/LanguageNameUtils.php4
-rw-r--r--includes/language/LocalisationCache.php4
-rw-r--r--includes/language/RawMessage.php1
-rw-r--r--includes/language/converters/BanConverter.php1
-rw-r--r--includes/libs/DnsSrvDiscoverer.php2
-rw-r--r--includes/libs/Message/DataMessageValue.php1
-rw-r--r--includes/libs/Message/MessageValue.php2
-rw-r--r--includes/libs/ReplacementArray.php1
-rw-r--r--includes/libs/Stats/Emitters/UDPEmitter.php11
-rw-r--r--includes/libs/Stats/Metrics/BaseMetric.php6
-rw-r--r--includes/libs/Stats/Metrics/BaseMetricInterface.php5
-rw-r--r--includes/libs/Stats/Metrics/CounterMetric.php2
-rw-r--r--includes/libs/Stats/Metrics/MetricInterface.php5
-rw-r--r--includes/libs/Stats/Metrics/MetricTrait.php4
-rw-r--r--includes/libs/Stats/Metrics/TimingMetric.php5
-rw-r--r--includes/libs/Stats/SamplingStatsdClient.php2
-rw-r--r--includes/libs/Stats/StatsCache.php2
-rw-r--r--includes/libs/Timing.php2
-rw-r--r--includes/libs/filebackend/FileBackendMultiWrite.php2
-rw-r--r--includes/libs/filebackend/FileBackendStore.php2
-rw-r--r--includes/libs/http/MultiHttpClient.php3
-rw-r--r--includes/libs/mime/MimeAnalyzer.php4
-rw-r--r--includes/libs/rdbms/ConfiguredReadOnlyMode.php2
-rw-r--r--includes/libs/rdbms/database/Database.php16
-rw-r--r--includes/libs/rdbms/database/DatabaseSqlite.php1
-rw-r--r--includes/libs/rdbms/database/TransactionManager.php7
-rw-r--r--includes/libs/rdbms/lbfactory/LBFactory.php4
-rw-r--r--includes/libs/rdbms/loadbalancer/LoadBalancer.php2
-rw-r--r--includes/libs/rdbms/querybuilder/DeleteQueryBuilder.php2
-rw-r--r--includes/libs/rdbms/querybuilder/InsertQueryBuilder.php2
-rw-r--r--includes/libs/rdbms/querybuilder/ReplaceQueryBuilder.php2
-rw-r--r--includes/libs/rdbms/querybuilder/SelectQueryBuilder.php7
-rw-r--r--includes/libs/rdbms/querybuilder/UnionQueryBuilder.php2
-rw-r--r--includes/libs/rdbms/querybuilder/UpdateQueryBuilder.php2
-rw-r--r--includes/libs/telemetry/Clock.php1
-rw-r--r--includes/libs/telemetry/TracerState.php2
-rw-r--r--includes/linker/LinkRenderer.php2
-rw-r--r--includes/linker/LinksMigration.php4
-rw-r--r--includes/logging/LogFormatter.php1
-rw-r--r--includes/logging/LogFormatterFactory.php4
-rw-r--r--includes/mail/EmailNotification.php1
-rw-r--r--includes/mail/EmailUserFactory.php4
-rw-r--r--includes/media/MediaHandlerFactory.php4
-rw-r--r--includes/objectcache/ObjectCacheFactory.php2
-rw-r--r--includes/page/Article.php6
-rw-r--r--includes/page/DeletePage.php2
-rw-r--r--includes/page/MergeHistory.php6
-rw-r--r--includes/page/PageIdentityValue.php1
-rw-r--r--includes/page/PageProps.php4
-rw-r--r--includes/page/PageReferenceValue.php2
-rw-r--r--includes/page/PageStoreRecord.php8
-rw-r--r--includes/page/RollbackPage.php5
-rw-r--r--includes/page/UndeletePage.php6
-rw-r--r--includes/page/WikiPage.php5
-rw-r--r--includes/pager/ReverseChronologicalPager.php4
-rw-r--r--includes/parser/CacheTime.php1
-rw-r--r--includes/parser/MagicWordFactory.php2
-rw-r--r--includes/parser/Parser.php6
-rw-r--r--includes/parser/ParserCache.php4
-rw-r--r--includes/parser/ParserOptions.php2
-rw-r--r--includes/parser/ParserOutput.php9
-rw-r--r--includes/parser/Parsoid/Config/PageConfig.php4
-rw-r--r--includes/parser/Parsoid/Config/SiteConfig.php6
-rw-r--r--includes/parser/Parsoid/HtmlToContentTransform.php14
-rw-r--r--includes/parser/Parsoid/LanguageVariantConverter.php1
-rw-r--r--includes/password/Password.php2
-rw-r--r--includes/password/PasswordFactory.php4
-rw-r--r--includes/profiler/SectionProfileCallback.php4
-rw-r--r--includes/recentchanges/CategoryMembershipChange.php4
-rw-r--r--includes/recentchanges/ChangeTrackingEventIngress.php4
-rw-r--r--includes/recentchanges/EnhancedChangesList.php2
-rw-r--r--includes/recentchanges/RCCacheEntryFactory.php7
-rw-r--r--includes/recentchanges/RCFeed/RCFeed.php4
-rw-r--r--includes/registration/ExtensionProcessor.php8
-rw-r--r--includes/registration/ExtensionRegistry.php3
-rw-r--r--includes/revisiondelete/RevDelArchivedRevisionItem.php1
-rw-r--r--includes/revisiondelete/RevDelRevisionItem.php2
-rw-r--r--includes/revisionlist/RevisionItem.php2
-rw-r--r--includes/search/Entity/SearchResultThumbnail.php1
-rw-r--r--includes/search/ISearchResultSet.php1
-rw-r--r--includes/search/SearchEngine.php2
-rw-r--r--includes/search/SearchResultSetTrait.php1
-rw-r--r--includes/search/SearchSuggestionSet.php4
-rw-r--r--includes/session/MetadataMergeException.php1
-rw-r--r--includes/session/PHPSessionHandler.php1
-rw-r--r--includes/session/Session.php1
-rw-r--r--includes/session/SessionBackend.php1
-rw-r--r--includes/session/SessionManager.php2
-rw-r--r--includes/session/SessionManagerInterface.php2
-rw-r--r--includes/session/SessionProvider.php5
-rw-r--r--includes/shell/CommandFactory.php2
-rw-r--r--includes/shell/Shell.php2
-rw-r--r--includes/site/CachingSiteStore.php4
-rw-r--r--includes/site/SiteExporter.php2
-rw-r--r--includes/skins/BaseTemplate.php2
-rw-r--r--includes/skins/QuickTemplate.php2
-rw-r--r--includes/skins/components/SkinComponentCopyright.php5
-rw-r--r--includes/skins/components/SkinComponentFooter.php2
-rw-r--r--includes/skins/components/SkinComponentLink.php4
-rw-r--r--includes/skins/components/SkinComponentLogo.php7
-rw-r--r--includes/skins/components/SkinComponentMenu.php5
-rw-r--r--includes/skins/components/SkinComponentSearch.php4
-rw-r--r--includes/skins/components/SkinComponentTableOfContents.php2
-rw-r--r--includes/sparql/SparqlClient.php3
-rw-r--r--includes/specialpage/AuthManagerSpecialPage.php1
-rw-r--r--includes/specialpage/ChangesListSpecialPage.php11
-rw-r--r--includes/specialpage/FormSpecialPage.php1
-rw-r--r--includes/specialpage/SpecialPageFactory.php3
-rw-r--r--includes/specials/Contribute/ContributeFactory.php4
-rw-r--r--includes/specials/SpecialBlock.php5
-rw-r--r--includes/specials/SpecialBookSources.php4
-rw-r--r--includes/specials/SpecialCategories.php4
-rw-r--r--includes/specials/SpecialComparePages.php4
-rw-r--r--includes/specials/SpecialContribute.php2
-rw-r--r--includes/specials/SpecialListDuplicatedFiles.php4
-rw-r--r--includes/specials/SpecialMute.php3
-rw-r--r--includes/specials/SpecialMyLanguage.php4
-rw-r--r--includes/specials/SpecialPageData.php2
-rw-r--r--includes/specials/SpecialPrefixIndex.php4
-rw-r--r--includes/specials/SpecialProtectedTitles.php5
-rw-r--r--includes/specials/SpecialRandomInCategory.php1
-rw-r--r--includes/specials/SpecialRandomPage.php4
-rw-r--r--includes/specials/SpecialRandomRedirect.php4
-rw-r--r--includes/specials/SpecialRandomRootPage.php4
-rw-r--r--includes/specials/SpecialRecentChanges.php2
-rw-r--r--includes/specials/SpecialRedirect.php4
-rw-r--r--includes/specials/SpecialResetTokens.php1
-rw-r--r--includes/specials/SpecialRunJobs.php4
-rw-r--r--includes/specials/SpecialTrackingCategories.php4
-rw-r--r--includes/specials/SpecialUnblock.php1
-rw-r--r--includes/specials/SpecialUndelete.php8
-rw-r--r--includes/specials/SpecialUnusedCategories.php4
-rw-r--r--includes/specials/SpecialUnusedTemplates.php4
-rw-r--r--includes/specials/pagers/ImageListPager.php1
-rw-r--r--includes/specials/pagers/UploadStashPager.php1
-rw-r--r--includes/telemetry/MediaWikiPropagator.php4
-rw-r--r--includes/title/Title.php2
-rw-r--r--includes/user/ActorCache.php4
-rw-r--r--includes/user/ActorStore.php6
-rw-r--r--includes/user/CentralId/CentralIdLookup.php5
-rw-r--r--includes/user/CentralId/CentralIdLookupFactory.php2
-rw-r--r--includes/user/Options/DefaultOptionsLookup.php2
-rw-r--r--includes/user/PasswordReset.php4
-rw-r--r--includes/user/TalkPageNotificationManager.php2
-rw-r--r--includes/user/TempUser/TempUserCreator.php16
-rw-r--r--includes/user/User.php4
-rw-r--r--includes/user/UserGroupManager.php2
-rw-r--r--includes/user/UserTimeCorrection.php1
-rw-r--r--includes/utils/BatchRowIterator.php3
-rw-r--r--includes/utils/UrlUtils.php1
-rw-r--r--includes/watchlist/NoWriteWatchedItemStore.php1
-rw-r--r--includes/watchlist/WatchedItemStore.php8
283 files changed, 5 insertions, 1107 deletions
diff --git a/includes/HookContainer/FauxHookHandlerArray.php b/includes/HookContainer/FauxHookHandlerArray.php
index 9e088498343a..0dc8a0b9b88f 100644
--- a/includes/HookContainer/FauxHookHandlerArray.php
+++ b/includes/HookContainer/FauxHookHandlerArray.php
@@ -17,10 +17,6 @@ class FauxHookHandlerArray implements \ArrayAccess, \IteratorAggregate {
private ?array $handlers = null;
- /**
- * @param HookContainer $hookContainer
- * @param string $name
- */
public function __construct( HookContainer $hookContainer, string $name ) {
$this->hookContainer = $hookContainer;
$this->name = $name;
diff --git a/includes/HookContainer/HookContainer.php b/includes/HookContainer/HookContainer.php
index 7fed84399f0d..4c30454bdaca 100644
--- a/includes/HookContainer/HookContainer.php
+++ b/includes/HookContainer/HookContainer.php
@@ -86,10 +86,6 @@ class HookContainer implements SalvageableService {
/** @var int The next ID to be used by scopedRegister() */
private $nextScopedRegisterId = 0;
- /**
- * @param HookRegistry $hookRegistry
- * @param ObjectFactory $objectFactory
- */
public function __construct(
HookRegistry $hookRegistry,
ObjectFactory $objectFactory
diff --git a/includes/MediaWikiEntryPoint.php b/includes/MediaWikiEntryPoint.php
index c0dd111b3a24..76fb6dad18f0 100644
--- a/includes/MediaWikiEntryPoint.php
+++ b/includes/MediaWikiEntryPoint.php
@@ -216,8 +216,6 @@ abstract class MediaWikiEntryPoint {
* Subclasses in core may override this to handle errors according
* to the expected output format.
* This method is not safe to override for extensions.
- *
- * @param Throwable $e
*/
protected function handleTopLevelError( Throwable $e ) {
// Type errors and such: at least handle it now and clean up the LBFactory state
@@ -841,8 +839,6 @@ abstract class MediaWikiEntryPoint {
* This is intended as a stepping stone for migration.
* Ideally, individual service objects should be injected
* via the constructor.
- *
- * @return MediaWikiServices
*/
protected function getServiceContainer(): MediaWikiServices {
return $this->mediaWikiServices;
diff --git a/includes/Output/OutputPage.php b/includes/Output/OutputPage.php
index 86036af47770..ecd1615d0c18 100644
--- a/includes/Output/OutputPage.php
+++ b/includes/Output/OutputPage.php
@@ -482,7 +482,6 @@ class OutputPage extends ContextSource {
* Constructor for OutputPage. This should not be called directly.
* Instead, a new RequestContext should be created, and it will implicitly create
* an OutputPage tied to that context.
- * @param IContextSource $context
*/
public function __construct( IContextSource $context ) {
$this->deprecatePublicProperty( 'mCategoryLinks', '1.38', __CLASS__ );
@@ -553,7 +552,6 @@ class OutputPage extends ContextSource {
/**
* Return a ParserOutput that can be used to set metadata properties
* for the current page.
- * @return ParserOutput
*/
public function getMetadata(): ParserOutput {
// We can deprecate the redundant
@@ -1056,8 +1054,6 @@ class OutputPage extends ContextSource {
/**
* Get the robots policy content attribute for the page
* as a string in the form <index policy>,<follow policy>,<options>.
- *
- * @return string
*/
private function getRobotsContent(): string {
$robotOptionString = $this->formatRobotsOptions();
@@ -1162,8 +1158,6 @@ class OutputPage extends ContextSource {
/**
* Set $mRedirectedFrom, the page which redirected us to the current page.
- *
- * @param PageReference $t
*/
public function setRedirectedFrom( PageReference $t ) {
$this->mRedirectedFrom = $t;
@@ -1301,8 +1295,6 @@ class OutputPage extends ContextSource {
/**
* Set the Title object to use
- *
- * @param PageReference $t
*/
public function setTitle( PageReference $t ) {
$t = Title::newFromPageReference( $t );
@@ -2064,8 +2056,6 @@ class OutputPage extends ContextSource {
/**
* Set whether the revision displayed (as set in ::setRevisionId())
* is the latest revision of the page.
- *
- * @param bool $isCurrent
*/
public function setRevisionIsCurrent( bool $isCurrent ): void {
$this->mRevisionIsCurrent = $isCurrent;
diff --git a/includes/ParamValidator/TypeDef/TitleDef.php b/includes/ParamValidator/TypeDef/TitleDef.php
index f6d73f1033ef..39610c01d7fe 100644
--- a/includes/ParamValidator/TypeDef/TitleDef.php
+++ b/includes/ParamValidator/TypeDef/TitleDef.php
@@ -43,10 +43,6 @@ class TitleDef extends TypeDef {
/** @var TitleFactory */
private $titleFactory;
- /**
- * @param Callbacks $callbacks
- * @param TitleFactory $titleFactory
- */
public function __construct( Callbacks $callbacks, TitleFactory $titleFactory ) {
parent::__construct( $callbacks );
$this->titleFactory = $titleFactory;
diff --git a/includes/Permissions/RateLimitSubject.php b/includes/Permissions/RateLimitSubject.php
index deadd6751b1e..eafc14c7e66c 100644
--- a/includes/Permissions/RateLimitSubject.php
+++ b/includes/Permissions/RateLimitSubject.php
@@ -68,9 +68,6 @@ class RateLimitSubject {
return $this->user;
}
- /**
- * @return string|null
- */
public function getIP(): ?string {
return $this->ip;
}
diff --git a/includes/RenameUser/Hook/RenameUserSQLHook.php b/includes/RenameUser/Hook/RenameUserSQLHook.php
index d364a78c3663..0ce99f1bfe13 100644
--- a/includes/RenameUser/Hook/RenameUserSQLHook.php
+++ b/includes/RenameUser/Hook/RenameUserSQLHook.php
@@ -19,8 +19,6 @@ interface RenameUserSQLHook {
/**
* Called in the constructer of RenameuserSQL (which performs the actual renaming of users).
- *
- * @param RenameuserSQL $renameUserSql
*/
public function onRenameUserSQL( RenameuserSQL $renameUserSql ): void;
diff --git a/includes/ResourceLoader/CodexModule.php b/includes/ResourceLoader/CodexModule.php
index 20a0dd8cf707..8ac078c978bf 100644
--- a/includes/ResourceLoader/CodexModule.php
+++ b/includes/ResourceLoader/CodexModule.php
@@ -575,8 +575,6 @@ class CodexModule extends FileModule {
/**
* For loading the entire Codex library, rather than a subset module of it.
- *
- * @param Context $context
*/
private function loadFullCodexLibrary( Context $context ) {
// Add all Codex JS files to the module's package
diff --git a/includes/ResourceLoader/Context.php b/includes/ResourceLoader/Context.php
index c308cdd3d5d2..edb97539be9a 100644
--- a/includes/ResourceLoader/Context.php
+++ b/includes/ResourceLoader/Context.php
@@ -170,8 +170,6 @@ class Context implements MessageLocalizer {
*
* Use cases:
* - Unit tests (deprecated, create empty instance directly or use RLTestCase).
- *
- * @return Context
*/
public static function newDummyContext(): Context {
// This currently creates a non-empty instance of ResourceLoader (all modules registered),
@@ -243,9 +241,6 @@ class Context implements MessageLocalizer {
return $this->skin;
}
- /**
- * @return string|null
- */
public function getUser(): ?string {
return $this->user;
}
@@ -322,9 +317,6 @@ class Context implements MessageLocalizer {
return $this->debug;
}
- /**
- * @return string|null
- */
public function getOnly(): ?string {
return $this->only;
}
@@ -350,23 +342,14 @@ class Context implements MessageLocalizer {
return $this->sourcemap;
}
- /**
- * @return string|null
- */
public function getImage(): ?string {
return $this->image;
}
- /**
- * @return string|null
- */
public function getVariant(): ?string {
return $this->variant;
}
- /**
- * @return string|null
- */
public function getFormat(): ?string {
return $this->format;
}
@@ -442,8 +425,6 @@ class Context implements MessageLocalizer {
* the cache and decrease its usefulness.
*
* E.g. Used by RequestFileCache to form a cache key for storing the response output.
- *
- * @return string
*/
public function getHash(): string {
if ( $this->hash === null ) {
diff --git a/includes/ResourceLoader/DerivativeContext.php b/includes/ResourceLoader/DerivativeContext.php
index 75194d7cd415..ae595602d665 100644
--- a/includes/ResourceLoader/DerivativeContext.php
+++ b/includes/ResourceLoader/DerivativeContext.php
@@ -173,9 +173,6 @@ class DerivativeContext extends Context {
return $this->userObj;
}
- /**
- * @param string|null $user
- */
public function setUser( ?string $user ) {
$this->user = $user;
$this->hash = null;
@@ -203,9 +200,6 @@ class DerivativeContext extends Context {
return $this->only;
}
- /**
- * @param string|null $only
- */
public function setOnly( ?string $only ) {
$this->only = $only;
$this->hash = null;
@@ -218,9 +212,6 @@ class DerivativeContext extends Context {
return $this->version;
}
- /**
- * @param string|null $version
- */
public function setVersion( ?string $version ) {
$this->version = $version;
$this->hash = null;
diff --git a/includes/ResourceLoader/FilePath.php b/includes/ResourceLoader/FilePath.php
index fb6a9bbd98e2..dbd23cb5b0a9 100644
--- a/includes/ResourceLoader/FilePath.php
+++ b/includes/ResourceLoader/FilePath.php
@@ -82,12 +82,10 @@ class FilePath {
return "{$this->remoteBasePath}/{$this->path}";
}
- /** @return string|null */
public function getLocalBasePath(): ?string {
return $this->localBasePath;
}
- /** @return string|null */
public function getRemoteBasePath(): ?string {
return $this->remoteBasePath;
}
diff --git a/includes/ResourceLoader/ImageModule.php b/includes/ResourceLoader/ImageModule.php
index 4793adf3ac15..702682e87559 100644
--- a/includes/ResourceLoader/ImageModule.php
+++ b/includes/ResourceLoader/ImageModule.php
@@ -327,10 +327,6 @@ class ImageModule extends Module {
return $this->globalVariants[$skin];
}
- /**
- * @param Context $context
- * @return array
- */
public function getStyles( Context $context ): array {
$this->loadFromDefinition();
diff --git a/includes/ResourceLoader/MessageBlobStore.php b/includes/ResourceLoader/MessageBlobStore.php
index a28b4eb5ce1f..38f2bdfed432 100644
--- a/includes/ResourceLoader/MessageBlobStore.php
+++ b/includes/ResourceLoader/MessageBlobStore.php
@@ -200,8 +200,6 @@ class MessageBlobStore implements LoggerAwareInterface {
*
* Used by LocalisationCache, DatabaseUpdater and purgeMessageBlobStore.php script
* after regenerating l10n cache.
- *
- * @param WANObjectCache $cache
*/
public static function clearGlobalCacheEntry( WANObjectCache $cache ) {
// Disable holdoff TTL because:
diff --git a/includes/ResourceLoader/ResourceLoader.php b/includes/ResourceLoader/ResourceLoader.php
index 77f79e9ce0d3..f0be4dd92198 100644
--- a/includes/ResourceLoader/ResourceLoader.php
+++ b/includes/ResourceLoader/ResourceLoader.php
@@ -1591,8 +1591,6 @@ MESSAGE;
* - new HtmlJsCode( '{}' )
* - new stdClass()
* - (object)[]
- *
- * @param array &$array
*/
private static function trimArray( array &$array ): void {
$i = count( $array );
diff --git a/includes/ResourceLoader/SkinModule.php b/includes/ResourceLoader/SkinModule.php
index 0c5de4b48c73..7db702ec488f 100644
--- a/includes/ResourceLoader/SkinModule.php
+++ b/includes/ResourceLoader/SkinModule.php
@@ -537,10 +537,6 @@ class SkinModule extends LessVarFileModule {
return $this->combineFeatureAndParentStyles( $featureStyles, $parentStyles );
}
- /**
- * @param Context $context
- * @return array
- */
public function getPreloadLinks( Context $context ): array {
if ( !in_array( 'logo', $this->features ) ) {
return [];
diff --git a/includes/ResourceLoader/StartUpModule.php b/includes/ResourceLoader/StartUpModule.php
index 2e49939423a5..0cffe9ef9784 100644
--- a/includes/ResourceLoader/StartUpModule.php
+++ b/includes/ResourceLoader/StartUpModule.php
@@ -299,8 +299,6 @@ class StartUpModule extends Module {
/**
* Base modules implicitly available to all modules.
- *
- * @return array
*/
private function getBaseModules(): array {
return [ 'jquery', 'mediawiki.base' ];
diff --git a/includes/Rest/BasicAccess/BasicRequestAuthorizer.php b/includes/Rest/BasicAccess/BasicRequestAuthorizer.php
index 7c77bf23b0a1..46c760db30aa 100644
--- a/includes/Rest/BasicAccess/BasicRequestAuthorizer.php
+++ b/includes/Rest/BasicAccess/BasicRequestAuthorizer.php
@@ -13,13 +13,10 @@ use MediaWiki\Rest\RequestInterface;
* @internal
*/
abstract class BasicRequestAuthorizer {
+
protected RequestInterface $request;
protected Handler $handler;
- /**
- * @param RequestInterface $request
- * @param Handler $handler
- */
public function __construct( RequestInterface $request, Handler $handler ) {
$this->request = $request;
$this->handler = $handler;
diff --git a/includes/Rest/ConditionalHeaderUtil.php b/includes/Rest/ConditionalHeaderUtil.php
index 3bd175b0d826..e95eaaa40dd2 100644
--- a/includes/Rest/ConditionalHeaderUtil.php
+++ b/includes/Rest/ConditionalHeaderUtil.php
@@ -125,8 +125,6 @@ class ConditionalHeaderUtil {
*
* If the headers are already present in the response, the existing headers
* take precedence.
- *
- * @param ResponseInterface $response
*/
public function applyResponseHeaders( ResponseInterface $response ) {
if ( $this->lastModified !== null && !$response->hasHeader( 'Last-Modified' ) ) {
diff --git a/includes/Rest/CorsUtils.php b/includes/Rest/CorsUtils.php
index da3e403bf645..668b099cba33 100644
--- a/includes/Rest/CorsUtils.php
+++ b/includes/Rest/CorsUtils.php
@@ -63,10 +63,6 @@ class CorsUtils implements BasicAuthorizerInterface {
return null;
}
- /**
- * @param Origin $origin
- * @return bool
- */
private function allowOrigin( Origin $origin ): bool {
$allowed = array_merge( [ $this->getCanonicalDomain() ],
$this->options->get( MainConfigNames::CrossSiteAJAXdomains ) );
diff --git a/includes/Rest/EntryPoint.php b/includes/Rest/EntryPoint.php
index 8beaffc46ead..9d6966a19b46 100644
--- a/includes/Rest/EntryPoint.php
+++ b/includes/Rest/EntryPoint.php
@@ -194,8 +194,6 @@ class EntryPoint extends MediaWikiEntryPoint {
/**
* Sets the router to use.
* Intended for testing.
- *
- * @param Router $router
*/
public function setRouter( Router $router ): void {
$this->router = $router;
diff --git a/includes/Rest/Handler.php b/includes/Rest/Handler.php
index 302b11e4a956..de44d9f6eb23 100644
--- a/includes/Rest/Handler.php
+++ b/includes/Rest/Handler.php
@@ -243,8 +243,6 @@ abstract class Handler {
/**
* Returns the path this handler is bound to relative to the module prefix.
* Includes path variables.
- *
- * @return string
*/
public function getPath(): string {
return $this->path;
@@ -267,11 +265,6 @@ abstract class Handler {
return $matches[1] ?? [];
}
- /**
- * Get the Router.
- *
- * @return Router
- */
protected function getRouter(): Router {
return $this->module->getRouter();
}
@@ -279,8 +272,6 @@ abstract class Handler {
/**
* Get the Module this handler belongs to.
* Will fail hard if called before initContext().
- *
- * @return Module
*/
protected function getModule(): Module {
return $this->module;
@@ -330,8 +321,6 @@ abstract class Handler {
/**
* Get the current request. The return type declaration causes it to raise
* a fatal error if initForExecute() has not yet been called.
- *
- * @return RequestInterface
*/
public function getRequest(): RequestInterface {
return $this->request;
@@ -352,8 +341,6 @@ abstract class Handler {
* Get the configuration array for the current route. The return type
* declaration causes it to raise a fatal error if initContext() has not
* been called.
- *
- * @return array
*/
public function getConfig(): array {
return $this->config;
@@ -363,8 +350,6 @@ abstract class Handler {
* Get the ResponseFactory which can be used to generate Response objects.
* This will raise a fatal error if initServices() has not been
* called.
- *
- * @return ResponseFactory
*/
public function getResponseFactory(): ResponseFactory {
return $this->responseFactory;
@@ -374,8 +359,6 @@ abstract class Handler {
* Get the Session.
* This will raise a fatal error if initSession() has not been
* called.
- *
- * @return Session
*/
public function getSession(): Session {
return $this->session;
@@ -535,8 +518,6 @@ abstract class Handler {
/**
* Apply cache control to enforce privacy.
- *
- * @param ResponseInterface $response
*/
public function applyCacheControl( ResponseInterface $response ) {
// NOTE: keep this consistent with the logic in OutputPage::sendCacheControl
diff --git a/includes/Rest/Handler/ActionModuleBasedHandler.php b/includes/Rest/Handler/ActionModuleBasedHandler.php
index ed5d798944a1..ee66459e58ad 100644
--- a/includes/Rest/Handler/ActionModuleBasedHandler.php
+++ b/includes/Rest/Handler/ActionModuleBasedHandler.php
@@ -36,8 +36,6 @@ abstract class ActionModuleBasedHandler extends Handler {
/**
* Set main action API entry point for testing.
- *
- * @param ApiMain $apiMain
*/
public function setApiMain( ApiMain $apiMain ) {
$this->apiMain = $apiMain;
diff --git a/includes/Rest/Handler/DiscoveryHandler.php b/includes/Rest/Handler/DiscoveryHandler.php
index 833fc0522749..04fc989269ce 100644
--- a/includes/Rest/Handler/DiscoveryHandler.php
+++ b/includes/Rest/Handler/DiscoveryHandler.php
@@ -25,7 +25,6 @@ class DiscoveryHandler extends Handler {
MainConfigNames::Server,
];
- /** @var ServiceOptions */
private ServiceOptions $options;
public function __construct( Config $config ) {
diff --git a/includes/Rest/Handler/Helper/HtmlInputTransformHelper.php b/includes/Rest/Handler/Helper/HtmlInputTransformHelper.php
index 201c7891152a..de2126e975d1 100644
--- a/includes/Rest/Handler/Helper/HtmlInputTransformHelper.php
+++ b/includes/Rest/Handler/Helper/HtmlInputTransformHelper.php
@@ -431,7 +431,6 @@ class HtmlInputTransformHelper {
/**
* Return HTMLTransform object, so additional context can be provided by calling setters on it.
- * @return HtmlToContentTransform
*/
public function getTransform(): HtmlToContentTransform {
return $this->transform;
@@ -616,8 +615,6 @@ class HtmlInputTransformHelper {
/**
* Creates a response containing the content derived from the input HTML.
* This will set the appropriate Content-Type header.
- *
- * @param ResponseInterface $response
*/
public function putContent( ResponseInterface $response ) {
$content = $this->getContent();
diff --git a/includes/Rest/Handler/Helper/HtmlMessageOutputHelper.php b/includes/Rest/Handler/Helper/HtmlMessageOutputHelper.php
index 42ae5534545a..59a9877b2582 100644
--- a/includes/Rest/Handler/Helper/HtmlMessageOutputHelper.php
+++ b/includes/Rest/Handler/Helper/HtmlMessageOutputHelper.php
@@ -58,9 +58,6 @@ class HtmlMessageOutputHelper implements HtmlOutputHelper {
$this->page = $page;
}
- /**
- * @return Message|null
- */
private function getDefaultSystemMessage(): ?Message {
$title = Title::castFromPageIdentity( $this->page );
diff --git a/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php b/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php
index 51ca17fceb8e..c50079a1920a 100644
--- a/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php
+++ b/includes/Rest/Handler/Helper/HtmlOutputRendererHelper.php
@@ -729,8 +729,6 @@ class HtmlOutputRendererHelper implements HtmlOutputHelper {
/**
* Returns the rendered HTML as a PageBundle object.
- *
- * @return PageBundle
*/
public function getPageBundle(): PageBundle {
// XXX: converting between PageBundle and ParserOutput is inefficient!
@@ -759,8 +757,6 @@ class HtmlOutputRendererHelper implements HtmlOutputHelper {
*
* This wil return null if RevisionRecord has been set but that RevisionRecord
* does not have a revision ID, e.g. when rendering a preview.
- *
- * @return ?int
*/
public function getRevisionId(): ?int {
if ( !$this->revisionOrId ) {
@@ -783,8 +779,6 @@ class HtmlOutputRendererHelper implements HtmlOutputHelper {
* TODO: Should we move this to Parsoid's ContentUtils class?
* There already is a stripUnnecessaryWrappersAndSyntheticNodes but
* it targets html2wt and does a lot more than just section unwrapping.
- *
- * @param Element $elt
*/
private function stripParsoidSectionTags( Element $elt ): void {
$n = $elt->firstChild;
diff --git a/includes/Rest/Handler/Helper/PageContentHelper.php b/includes/Rest/Handler/Helper/PageContentHelper.php
index 366124ff20a7..c6b781b06c7f 100644
--- a/includes/Rest/Handler/Helper/PageContentHelper.php
+++ b/includes/Rest/Handler/Helper/PageContentHelper.php
@@ -111,9 +111,6 @@ class PageContentHelper {
return $this->parameters['title'] ?? null;
}
- /**
- * @return ExistingPageRecord|null
- */
public function getPage(): ?ExistingPageRecord {
if ( $this->pageRecord === false ) {
$titleText = $this->getTitleText();
@@ -224,9 +221,6 @@ class PageContentHelper {
return '"' . sha1( $revisionTag ) . '"';
}
- /**
- * @return string|null
- */
public function getLastModified(): ?string {
if ( !$this->isAccessible() ) {
return null;
@@ -241,8 +235,6 @@ class PageContentHelper {
/**
* Checks whether content exists. Permission checks are not considered.
- *
- * @return bool
*/
public function hasContent(): bool {
return $this->useDefaultSystemMessage() || (bool)$this->getPage();
@@ -339,8 +331,6 @@ class PageContentHelper {
*
* Handlers that can follow wiki redirects can use this to give clients
* control over the redirect handling behavior.
- *
- * @return bool
*/
public function getRedirectsAllowed(): bool {
return $this->parameters['redirect'] ?? true;
@@ -366,16 +356,11 @@ class PageContentHelper {
/**
* If the page is a system message page. When the content gets
* overridden to create an actual page, this method returns false.
- *
- * @return bool
*/
public function useDefaultSystemMessage(): bool {
return $this->getDefaultSystemMessage() !== null && $this->getPage() === null;
}
- /**
- * @return Message|null
- */
public function getDefaultSystemMessage(): ?Message {
$title = Title::newFromText( $this->getTitleText() );
diff --git a/includes/Rest/Handler/Helper/RevisionContentHelper.php b/includes/Rest/Handler/Helper/RevisionContentHelper.php
index b717a8936285..66b1e2bb72ed 100644
--- a/includes/Rest/Handler/Helper/RevisionContentHelper.php
+++ b/includes/Rest/Handler/Helper/RevisionContentHelper.php
@@ -32,9 +32,6 @@ class RevisionContentHelper extends PageContentHelper {
: null;
}
- /**
- * @return ExistingPageRecord|null
- */
public function getPage(): ?ExistingPageRecord {
$revision = $this->getTargetRevision();
return $revision ? $this->pageLookup->getPageByReference( $revision->getPage() ) : null;
diff --git a/includes/Rest/Handler/LanguageLinksHandler.php b/includes/Rest/Handler/LanguageLinksHandler.php
index db32cf9d7fa6..5c4c3a51d0ed 100644
--- a/includes/Rest/Handler/LanguageLinksHandler.php
+++ b/includes/Rest/Handler/LanguageLinksHandler.php
@@ -73,9 +73,6 @@ class LanguageLinksHandler extends SimpleHandler {
);
}
- /**
- * @return ExistingPageRecord|null
- */
private function getPage(): ?ExistingPageRecord {
if ( $this->page === false ) {
$this->page = $this->pageLookup->getExistingPageByText(
@@ -164,9 +161,6 @@ class LanguageLinksHandler extends SimpleHandler {
];
}
- /**
- * @return string|null
- */
protected function getETag(): ?string {
$page = $this->getPage();
if ( !$page ) {
@@ -177,9 +171,6 @@ class LanguageLinksHandler extends SimpleHandler {
return '"' . $page->getLatest() . '@' . wfTimestamp( TS_MW, $page->getTouched() ) . '"';
}
- /**
- * @return string|null
- */
protected function getLastModified(): ?string {
$page = $this->getPage();
return $page ? $page->getTouched() : null;
diff --git a/includes/Rest/Handler/MediaFileHandler.php b/includes/Rest/Handler/MediaFileHandler.php
index 53f70c667996..97d3ed54e7da 100644
--- a/includes/Rest/Handler/MediaFileHandler.php
+++ b/includes/Rest/Handler/MediaFileHandler.php
@@ -41,9 +41,6 @@ class MediaFileHandler extends SimpleHandler {
$this->pageLookup = $pageLookup;
}
- /**
- * @return ExistingPageRecord|null
- */
private function getPage(): ?ExistingPageRecord {
if ( $this->page === false ) {
$this->page = $this->pageLookup->getExistingPageByText(
@@ -53,9 +50,6 @@ class MediaFileHandler extends SimpleHandler {
return $this->page;
}
- /**
- * @return File|null
- */
private function getFile(): ?File {
if ( $this->file === false ) {
$page = $this->getPage();
diff --git a/includes/Rest/Handler/MediaLinksHandler.php b/includes/Rest/Handler/MediaLinksHandler.php
index ef4631798442..9d8d65fca6f1 100644
--- a/includes/Rest/Handler/MediaLinksHandler.php
+++ b/includes/Rest/Handler/MediaLinksHandler.php
@@ -42,9 +42,6 @@ class MediaLinksHandler extends SimpleHandler {
$this->pageLookup = $pageLookup;
}
- /**
- * @return ExistingPageRecord|null
- */
private function getPage(): ?ExistingPageRecord {
if ( $this->page === false ) {
$this->page = $this->pageLookup->getExistingPageByText(
diff --git a/includes/Rest/Handler/PageHTMLHandler.php b/includes/Rest/Handler/PageHTMLHandler.php
index d10c79d7f4f1..6a6f583741a5 100644
--- a/includes/Rest/Handler/PageHTMLHandler.php
+++ b/includes/Rest/Handler/PageHTMLHandler.php
@@ -148,9 +148,6 @@ class PageHTMLHandler extends SimpleHandler {
return $this->htmlHelper->getETag( $this->getOutputMode() );
}
- /**
- * @return string|null
- */
protected function getLastModified(): ?string {
if ( !$this->contentHelper->isAccessible() || !$this->contentHelper->hasContent() ) {
return null;
diff --git a/includes/Rest/Handler/PageHistoryCountHandler.php b/includes/Rest/Handler/PageHistoryCountHandler.php
index 2c6a25264b92..edc161966246 100644
--- a/includes/Rest/Handler/PageHistoryCountHandler.php
+++ b/includes/Rest/Handler/PageHistoryCountHandler.php
@@ -314,9 +314,6 @@ class PageHistoryCountHandler extends SimpleHandler {
return $this->revision;
}
- /**
- * @return ExistingPageRecord|null
- */
private function getPage(): ?ExistingPageRecord {
if ( $this->page === false ) {
$this->page = $this->pageLookup->getExistingPageByText(
diff --git a/includes/Rest/Handler/PageHistoryHandler.php b/includes/Rest/Handler/PageHistoryHandler.php
index 8181d25e4de9..3c4febcf5966 100644
--- a/includes/Rest/Handler/PageHistoryHandler.php
+++ b/includes/Rest/Handler/PageHistoryHandler.php
@@ -86,9 +86,6 @@ class PageHistoryHandler extends SimpleHandler {
);
}
- /**
- * @return ExistingPageRecord|null
- */
private function getPage(): ?ExistingPageRecord {
if ( $this->page === false ) {
$this->page = $this->pageLookup->getExistingPageByText(
diff --git a/includes/Rest/Handler/PageSourceHandler.php b/includes/Rest/Handler/PageSourceHandler.php
index d0da5d519463..1c47370950d5 100644
--- a/includes/Rest/Handler/PageSourceHandler.php
+++ b/includes/Rest/Handler/PageSourceHandler.php
@@ -46,10 +46,6 @@ class PageSourceHandler extends SimpleHandler {
$this->contentHelper->init( $this->getAuthority(), $this->getValidatedParams() );
}
- /**
- * @param PageReference $page
- * @return string
- */
private function constructHtmlUrl( PageReference $page ): string {
// TODO: once legacy "v1" routes are removed, just use the path prefix from the module.
$pathPrefix = $this->getModule()->getPathPrefix();
@@ -138,9 +134,6 @@ class PageSourceHandler extends SimpleHandler {
return $this->contentHelper->getETag();
}
- /**
- * @return string|null
- */
protected function getLastModified(): ?string {
return $this->contentHelper->getLastModified();
}
diff --git a/includes/Rest/Handler/ParsoidHandler.php b/includes/Rest/Handler/ParsoidHandler.php
index 2049ab0aaae9..092cf92f0894 100644
--- a/includes/Rest/Handler/ParsoidHandler.php
+++ b/includes/Rest/Handler/ParsoidHandler.php
@@ -176,8 +176,6 @@ abstract class ParsoidHandler extends Handler {
/**
* Get the parsed body by content-type
- *
- * @return array
*/
protected function getParsedBody(): array {
$request = $this->getRequest();
diff --git a/includes/Rest/Handler/RevisionHTMLHandler.php b/includes/Rest/Handler/RevisionHTMLHandler.php
index 94596ec025e9..09b70254d21e 100644
--- a/includes/Rest/Handler/RevisionHTMLHandler.php
+++ b/includes/Rest/Handler/RevisionHTMLHandler.php
@@ -111,9 +111,6 @@ class RevisionHTMLHandler extends SimpleHandler {
return $this->htmlHelper->getETag( $this->getOutputMode() );
}
- /**
- * @return string|null
- */
protected function getLastModified(): ?string {
if ( !$this->contentHelper->isAccessible() ) {
return null;
diff --git a/includes/Rest/Handler/RevisionSourceHandler.php b/includes/Rest/Handler/RevisionSourceHandler.php
index 9aefc351e146..f3b2ff405cff 100644
--- a/includes/Rest/Handler/RevisionSourceHandler.php
+++ b/includes/Rest/Handler/RevisionSourceHandler.php
@@ -28,10 +28,6 @@ class RevisionSourceHandler extends SimpleHandler {
$this->contentHelper->init( $this->getAuthority(), $this->getValidatedParams() );
}
- /**
- * @param RevisionRecord $rev
- * @return string
- */
private function constructHtmlUrl( RevisionRecord $rev ): string {
// TODO: once legacy "v1" routes are removed, just use the path prefix from the module.
$pathPrefix = $this->getModule()->getPathPrefix();
@@ -99,16 +95,10 @@ class RevisionSourceHandler extends SimpleHandler {
}
}
- /**
- * @return string|null
- */
protected function getETag(): ?string {
return $this->contentHelper->getETag();
}
- /**
- * @return string|null
- */
protected function getLastModified(): ?string {
return $this->contentHelper->getLastModified();
}
diff --git a/includes/Rest/Handler/UpdateHandler.php b/includes/Rest/Handler/UpdateHandler.php
index a6b82814eed7..2fbc089237eb 100644
--- a/includes/Rest/Handler/UpdateHandler.php
+++ b/includes/Rest/Handler/UpdateHandler.php
@@ -33,8 +33,6 @@ class UpdateHandler extends EditHandler {
/**
* Sets the function to use for JSON diffs, for testing.
- *
- * @param callable $jsonDiffFunction
*/
public function setJsonDiffFunction( callable $jsonDiffFunction ) {
$this->jsonDiffFunction = $jsonDiffFunction;
diff --git a/includes/Rest/HeaderParser/Origin.php b/includes/Rest/HeaderParser/Origin.php
index 16163a065ff3..ec0b122ca1f4 100644
--- a/includes/Rest/HeaderParser/Origin.php
+++ b/includes/Rest/HeaderParser/Origin.php
@@ -33,8 +33,6 @@ class Origin extends HeaderParserBase {
/**
* Whether the Origin header was explicitly set to `null`.
- *
- * @return bool
*/
public function isNullOrigin(): bool {
return $this->isNullOrigin;
@@ -42,8 +40,6 @@ class Origin extends HeaderParserBase {
/**
* Whether the Origin header contains multiple origins.
- *
- * @return bool
*/
public function isMultiOrigin(): bool {
return count( $this->getOriginList() ) > 1;
diff --git a/includes/Rest/HttpException.php b/includes/Rest/HttpException.php
index ebfba5c6b409..de4453db89d1 100644
--- a/includes/Rest/HttpException.php
+++ b/includes/Rest/HttpException.php
@@ -11,7 +11,6 @@ namespace MediaWiki\Rest;
*/
class HttpException extends \Exception {
- /** @var array */
private array $errorData;
/**
diff --git a/includes/Rest/Module/ExtraRoutesModule.php b/includes/Rest/Module/ExtraRoutesModule.php
index 4b462900d1ae..91e652869a79 100644
--- a/includes/Rest/Module/ExtraRoutesModule.php
+++ b/includes/Rest/Module/ExtraRoutesModule.php
@@ -78,7 +78,6 @@ class ExtraRoutesModule extends MatcherBasedModule {
/** @var int[]|null */
private ?array $routeFileTimestamps = null;
- /** @var string|null */
private ?string $configHash = null;
/**
@@ -114,8 +113,6 @@ class ExtraRoutesModule extends MatcherBasedModule {
/**
* Get a config version hash for cache invalidation
- *
- * @return string
*/
protected function getConfigHash(): string {
if ( $this->configHash === null ) {
diff --git a/includes/Rest/Module/Module.php b/includes/Rest/Module/Module.php
index accf693ca2c1..f8396f7bf985 100644
--- a/includes/Rest/Module/Module.php
+++ b/includes/Rest/Module/Module.php
@@ -396,10 +396,6 @@ abstract class Module {
return $response;
}
- /**
- * @param CorsUtils $cors
- * @return self
- */
public function setCors( CorsUtils $cors ): self {
$this->cors = $cors;
diff --git a/includes/Rest/Module/SpecBasedModule.php b/includes/Rest/Module/SpecBasedModule.php
index c627d1d74992..feb19a0bfb05 100644
--- a/includes/Rest/Module/SpecBasedModule.php
+++ b/includes/Rest/Module/SpecBasedModule.php
@@ -73,8 +73,6 @@ class SpecBasedModule extends MatcherBasedModule {
/**
* Get a config version hash for cache invalidation
- *
- * @return string
*/
protected function getConfigHash(): string {
if ( $this->configHash === null ) {
@@ -89,8 +87,6 @@ class SpecBasedModule extends MatcherBasedModule {
/**
* Load the module definition file.
- *
- * @return array
*/
private function getModuleDefinition(): array {
if ( $this->moduleDef !== null ) {
diff --git a/includes/Rest/Router.php b/includes/Rest/Router.php
index d49163468bcb..30fd8da9032a 100644
--- a/includes/Rest/Router.php
+++ b/includes/Rest/Router.php
@@ -196,8 +196,6 @@ class Router {
/**
* Get the cache data, or false if it is missing or invalid
- *
- * @return ?array
*/
private function fetchCachedModuleMap(): ?array {
$moduleMapCacheKey = $this->getModuleMapCacheKey();
@@ -505,10 +503,6 @@ class Router {
$handler->initSession( $this->session );
}
- /**
- * @param CorsUtils $cors
- * @return self
- */
public function setCors( CorsUtils $cors ): self {
$this->cors = $cors;
@@ -528,10 +522,6 @@ class Router {
return $this;
}
- /**
- * @param array $info
- * @param string $name
- */
private function instantiateModule( array $info, string $name ): Module {
if ( $info['class'] === SpecBasedModule::class ) {
$module = new SpecBasedModule(
diff --git a/includes/Rest/TokenAwareHandlerTrait.php b/includes/Rest/TokenAwareHandlerTrait.php
index 47c7fcc4780b..2bf13a9ff589 100644
--- a/includes/Rest/TokenAwareHandlerTrait.php
+++ b/includes/Rest/TokenAwareHandlerTrait.php
@@ -66,8 +66,6 @@ trait TokenAwareHandlerTrait {
*
* Returns false if the request has been authenticated in a way that
* protects against CSRF, such as OAuth.
- *
- * @return bool
*/
protected function needsToken(): bool {
return !$this->getSession()->getProvider()->safeAgainstCsrf();
@@ -76,8 +74,6 @@ trait TokenAwareHandlerTrait {
/**
* Returns a standard error message to use when the given CSRF token is invalid.
* In the future, this trait may also provide a method for checking the token.
- *
- * @return MessageValue
*/
protected function getBadTokenMessage(): MessageValue {
return DataMessageValue::new( 'rest-badtoken' );
diff --git a/includes/Rest/Validator/UnsupportedContentTypeBodyValidator.php b/includes/Rest/Validator/UnsupportedContentTypeBodyValidator.php
index 5fbd26ea9059..1642aa8ef0f6 100644
--- a/includes/Rest/Validator/UnsupportedContentTypeBodyValidator.php
+++ b/includes/Rest/Validator/UnsupportedContentTypeBodyValidator.php
@@ -20,7 +20,6 @@ use Wikimedia\Message\MessageValue;
*/
class UnsupportedContentTypeBodyValidator implements BodyValidator {
- /** @var string */
private string $contentType;
public function __construct( string $contentType ) {
diff --git a/includes/Revision/ArchivedRevisionLookup.php b/includes/Revision/ArchivedRevisionLookup.php
index 2a5ed0b6004f..cd054831c04e 100644
--- a/includes/Revision/ArchivedRevisionLookup.php
+++ b/includes/Revision/ArchivedRevisionLookup.php
@@ -37,10 +37,6 @@ class ArchivedRevisionLookup {
/** @var RevisionStore */
private $revisionStore;
- /**
- * @param IConnectionProvider $dbProvider
- * @param RevisionStore $revisionStore
- */
public function __construct(
IConnectionProvider $dbProvider,
RevisionStore $revisionStore
diff --git a/includes/Revision/ContributionsSegment.php b/includes/Revision/ContributionsSegment.php
index 40b395fea4bf..4b2c3701fe49 100644
--- a/includes/Revision/ContributionsSegment.php
+++ b/includes/Revision/ContributionsSegment.php
@@ -85,16 +85,10 @@ class ContributionsSegment {
return $this->revisions;
}
- /**
- * @return string|null
- */
public function getBefore(): ?string {
return $this->before;
}
- /**
- * @return string|null
- */
public function getAfter(): ?string {
return $this->after;
}
@@ -112,8 +106,6 @@ class ContributionsSegment {
/**
* The value of the 'newest' field of the flags passed to the constructor, or false
* if that field was not set.
- *
- * @return bool
*/
public function isNewest(): bool {
return $this->flags['newest'] ?? false;
@@ -122,8 +114,6 @@ class ContributionsSegment {
/**
* The value of the 'oldest' field of the flags passed to the constructor, or false
* if that field was not set.
- *
- * @return bool
*/
public function isOldest(): bool {
return $this->flags['oldest'] ?? false;
diff --git a/includes/Revision/MutableRevisionRecord.php b/includes/Revision/MutableRevisionRecord.php
index 3333236cb8b1..62e8eb898f66 100644
--- a/includes/Revision/MutableRevisionRecord.php
+++ b/includes/Revision/MutableRevisionRecord.php
@@ -378,8 +378,6 @@ class MutableRevisionRecord extends RevisionRecord {
/**
* Returns the slots defined for this revision as a MutableRevisionSlots instance,
* which can be modified to defined the slots for this revision.
- *
- * @return MutableRevisionSlots
*/
public function getSlots(): MutableRevisionSlots {
// Overwritten just to guarantee the more narrow return type.
diff --git a/includes/Revision/MutableRevisionSlots.php b/includes/Revision/MutableRevisionSlots.php
index 96380024f279..c3cd5700b778 100644
--- a/includes/Revision/MutableRevisionSlots.php
+++ b/includes/Revision/MutableRevisionSlots.php
@@ -73,8 +73,6 @@ class MutableRevisionSlots extends RevisionSlots {
/**
* Sets the given slot.
* If a slot with the same role is already present, it is replaced.
- *
- * @param SlotRecord $slot
*/
public function setSlot( SlotRecord $slot ) {
if ( !is_array( $this->slots ) ) {
@@ -89,8 +87,6 @@ class MutableRevisionSlots extends RevisionSlots {
/**
* Sets the given slot to an inherited version of $slot.
* If a slot with the same role is already present, it is replaced.
- *
- * @param SlotRecord $slot
*/
public function inheritSlot( SlotRecord $slot ) {
$this->setSlot( SlotRecord::newInherited( $slot ) );
diff --git a/includes/Revision/RevisionRecord.php b/includes/Revision/RevisionRecord.php
index d3fda1f63205..80874b40a151 100644
--- a/includes/Revision/RevisionRecord.php
+++ b/includes/Revision/RevisionRecord.php
@@ -291,8 +291,6 @@ abstract class RevisionRecord implements WikiAwareEntity {
*
* To find all slots modified by this revision against its immediate parent
* revision, use RevisionSlotsUpdate::newFromRevisionSlots().
- *
- * @return RevisionSlots
*/
public function getOriginalSlots(): RevisionSlots {
return new RevisionSlots( $this->mSlots->getOriginalSlots() );
@@ -306,8 +304,6 @@ abstract class RevisionRecord implements WikiAwareEntity {
* This is the case for rollbacks: slots of a rollback revision are inherited from
* the rollback target, and are different from the slots in the parent revision,
* which was rolled back.
- *
- * @return RevisionSlots
*/
public function getInheritedSlots(): RevisionSlots {
return new RevisionSlots( $this->mSlots->getInheritedSlots() );
diff --git a/includes/Revision/RevisionStore.php b/includes/Revision/RevisionStore.php
index 99e567aeb1ed..9ead1a0afdf3 100644
--- a/includes/Revision/RevisionStore.php
+++ b/includes/Revision/RevisionStore.php
@@ -360,11 +360,6 @@ class RevisionStore implements RevisionFactory, RevisionLookup, LoggerAwareInter
);
}
- /**
- * @param PageIdentity $page
- *
- * @return PageIdentity
- */
private function wrapPage( PageIdentity $page ): PageIdentity {
if ( $this->wikiId === WikiAwareEntity::LOCAL ) {
// NOTE: since there is still a lot of code that needs a full Title,
@@ -2373,8 +2368,6 @@ class RevisionStore implements RevisionFactory, RevisionLookup, LoggerAwareInter
/**
* Throws an exception if the given database connection does not belong to the wiki this
* RevisionStore is bound to.
- *
- * @param IReadableDatabase $db
*/
private function checkDatabaseDomain( IReadableDatabase $db ) {
$dbDomain = $db->getDomainID();
diff --git a/includes/Settings/Cache/CachedSource.php b/includes/Settings/Cache/CachedSource.php
index 2f00595c313d..e805cc6eae6c 100644
--- a/includes/Settings/Cache/CachedSource.php
+++ b/includes/Settings/Cache/CachedSource.php
@@ -116,8 +116,6 @@ class CachedSource implements Stringable, SettingsSource, SettingsIncludeLocator
/**
* Returns the string representation of the encapsulated source.
- *
- * @return string
*/
public function __toString(): string {
return $this->source->__toString();
@@ -213,8 +211,6 @@ class CachedSource implements Stringable, SettingsSource, SettingsIncludeLocator
/**
* Wraps cached source with the metadata needed to perform probabilistic
* early expiration to help mitigate cache stampedes.
- *
- * @return array
*/
private function loadWithMetadata(): array {
$start = microtime( true );
diff --git a/includes/Settings/Config/ArrayConfigBuilder.php b/includes/Settings/Config/ArrayConfigBuilder.php
index ddcb6f5e5e78..4a8dd53afe75 100644
--- a/includes/Settings/Config/ArrayConfigBuilder.php
+++ b/includes/Settings/Config/ArrayConfigBuilder.php
@@ -48,8 +48,6 @@ class ArrayConfigBuilder extends ConfigBuilderBase {
/**
* Build the configuration.
- *
- * @return IterableConfig
*/
public function build(): IterableConfig {
return new HashConfig( $this->config );
diff --git a/includes/Settings/Config/ConfigSchemaAggregator.php b/includes/Settings/Config/ConfigSchemaAggregator.php
index d63621b30e67..b6f270650912 100644
--- a/includes/Settings/Config/ConfigSchemaAggregator.php
+++ b/includes/Settings/Config/ConfigSchemaAggregator.php
@@ -253,8 +253,6 @@ class ConfigSchemaAggregator implements ConfigSchema {
/**
* Get all defined default values.
- *
- * @return array
*/
public function getDefaults(): array {
return $this->defaults;
diff --git a/includes/Settings/LocalSettingsLoader.php b/includes/Settings/LocalSettingsLoader.php
index f39b77ae79f6..164fc519d03a 100644
--- a/includes/Settings/LocalSettingsLoader.php
+++ b/includes/Settings/LocalSettingsLoader.php
@@ -15,10 +15,6 @@ class LocalSettingsLoader {
private string $baseDir;
- /**
- * @param SettingsBuilder $settingsBuilder
- * @param string $baseDir
- */
public function __construct( SettingsBuilder $settingsBuilder, string $baseDir ) {
$this->settingsBuilder = $settingsBuilder;
$this->baseDir = $baseDir;
diff --git a/includes/Settings/SettingsBuilder.php b/includes/Settings/SettingsBuilder.php
index 39211cd32bc2..a11b0c3db531 100644
--- a/includes/Settings/SettingsBuilder.php
+++ b/includes/Settings/SettingsBuilder.php
@@ -285,11 +285,6 @@ class SettingsBuilder {
return file_exists( $path );
}
- /**
- * @param SettingsSource $source
- *
- * @return SettingsSource
- */
private function wrapSource( SettingsSource $source ): SettingsSource {
if ( $this->cache !== null && $source instanceof CacheableSource ) {
$source = new CachedSource( $this->cache, $source );
@@ -587,8 +582,6 @@ class SettingsBuilder {
/**
* Apply the settings array.
- *
- * @param array $settings
*/
private function applySettings( array $settings ) {
// First extract config variables that change the behavior of SettingsBuilder.
@@ -835,8 +828,6 @@ class SettingsBuilder {
* In addition, the updater will fail if it finds any warnings.
* This allows us to warn about deprecated settings, and make sure they are
* replaced before the update proceeds.
- *
- * @param string $msg
*/
public function warning( string $msg ) {
$this->assertNotReadOnly( __METHOD__ );
diff --git a/includes/Settings/Source/EtcdSource.php b/includes/Settings/Source/EtcdSource.php
index 58ccccb35849..108eef03a6aa 100644
--- a/includes/Settings/Source/EtcdSource.php
+++ b/includes/Settings/Source/EtcdSource.php
@@ -144,8 +144,6 @@ class EtcdSource implements Stringable, CacheableSource {
/**
* Allow stale results from etcd sources in case all servers become
* temporarily unavailable.
- *
- * @return bool
*/
public function allowsStaleLoad(): bool {
return true;
@@ -179,8 +177,6 @@ class EtcdSource implements Stringable, CacheableSource {
/**
* The cache expiry TTL (in seconds) for this source.
- *
- * @return int
*/
public function getExpiryTtl(): int {
return self::EXPIRY_TTL;
@@ -189,8 +185,6 @@ class EtcdSource implements Stringable, CacheableSource {
/**
* Coefficient used in determining early expiration of cached settings to
* avoid stampedes.
- *
- * @return float
*/
public function getExpiryWeight(): float {
return self::EXPIRY_WEIGHT;
@@ -201,8 +195,6 @@ class EtcdSource implements Stringable, CacheableSource {
* URL constructed using the etcd request URL. In the case where SRV
* discovery is performed, the host in the URL will be the SRV record
* name.
- *
- * @return string
*/
public function getHashKey(): string {
return (string)$this->uri;
@@ -210,8 +202,6 @@ class EtcdSource implements Stringable, CacheableSource {
/**
* Returns this etcd source as a string.
- *
- * @return string
*/
public function __toString(): string {
return (string)$this->uri;
diff --git a/includes/Settings/Source/FileSource.php b/includes/Settings/Source/FileSource.php
index 3c6bb81ca9fb..c1e001b1bf49 100644
--- a/includes/Settings/Source/FileSource.php
+++ b/includes/Settings/Source/FileSource.php
@@ -94,8 +94,6 @@ class FileSource implements Stringable, CacheableSource, SettingsIncludeLocator
* Disallow stale results from file sources in the case of load failure as
* failing to read from disk would be quite catastrophic and worthy of
* propagation.
- *
- * @return bool
*/
public function allowsStaleLoad(): bool {
return false;
@@ -133,8 +131,6 @@ class FileSource implements Stringable, CacheableSource, SettingsIncludeLocator
/**
* The cache expiry TTL (in seconds) for this file source.
- *
- * @return int
*/
public function getExpiryTtl(): int {
return self::EXPIRY_TTL;
@@ -143,8 +139,6 @@ class FileSource implements Stringable, CacheableSource, SettingsIncludeLocator
/**
* Coefficient used in determining early expiration of cached settings to
* avoid stampedes.
- *
- * @return float
*/
public function getExpiryWeight(): float {
return self::EXPIRY_WEIGHT;
@@ -153,8 +147,6 @@ class FileSource implements Stringable, CacheableSource, SettingsIncludeLocator
/**
* Returns a hash key computed from the file's inode, size, and last
* modified timestamp.
- *
- * @return string
*/
public function getHashKey(): string {
$stat = stat( $this->path );
@@ -171,8 +163,6 @@ class FileSource implements Stringable, CacheableSource, SettingsIncludeLocator
/**
* Returns this file source as a string.
- *
- * @return string
*/
public function __toString(): string {
return $this->path;
diff --git a/includes/Settings/Source/PhpSettingsSource.php b/includes/Settings/Source/PhpSettingsSource.php
index cf2699c3d893..3e0a66e2c2bc 100644
--- a/includes/Settings/Source/PhpSettingsSource.php
+++ b/includes/Settings/Source/PhpSettingsSource.php
@@ -73,8 +73,6 @@ class PhpSettingsSource implements Stringable, SettingsSource, SettingsIncludeLo
/**
* Returns this file source as a string.
- *
- * @return string
*/
public function __toString(): string {
return $this->path;
diff --git a/includes/Settings/Source/ReflectionSchemaSource.php b/includes/Settings/Source/ReflectionSchemaSource.php
index a5c8cf218c72..7937847a4bad 100644
--- a/includes/Settings/Source/ReflectionSchemaSource.php
+++ b/includes/Settings/Source/ReflectionSchemaSource.php
@@ -158,8 +158,6 @@ class ReflectionSchemaSource implements Stringable, SettingsSource {
/**
* Returns this file source as a string.
- *
- * @return string
*/
public function __toString(): string {
return 'class ' . $this->class;
diff --git a/includes/Storage/DerivedPageDataUpdater.php b/includes/Storage/DerivedPageDataUpdater.php
index 85eeb7b6ac06..a165b2b40fdc 100644
--- a/includes/Storage/DerivedPageDataUpdater.php
+++ b/includes/Storage/DerivedPageDataUpdater.php
@@ -326,7 +326,6 @@ class DerivedPageDataUpdater implements LoggerAwareInterface, PreparedUpdate {
/** @var bool */
private $warmParsoidParserCache;
- /** @var ChangeTagsStore */
private ChangeTagsStore $changeTagsStore;
/**
diff --git a/includes/Storage/EditResult.php b/includes/Storage/EditResult.php
index 3b33fc0e3499..9426aab706b6 100644
--- a/includes/Storage/EditResult.php
+++ b/includes/Storage/EditResult.php
@@ -161,8 +161,6 @@ class EditResult implements JsonSerializable {
/**
* If the edit was an undo, returns the oldest revision that was undone.
* Method kept for compatibility reasons.
- *
- * @return int
*/
public function getUndidRevId(): int {
if ( $this->getRevertMethod() !== self::REVERT_UNDO ) {
@@ -188,8 +186,6 @@ class EditResult implements JsonSerializable {
/**
* Whether the edit created a new page
- *
- * @return bool
*/
public function isNew(): bool {
return $this->isNew;
@@ -209,8 +205,6 @@ class EditResult implements JsonSerializable {
* To check whether the edit was an exact revert, please use the isExactRevert() method.
* The getRevertMethod() will provide additional information about which kind of revert
* was made.
- *
- * @return bool
*/
public function isRevert(): bool {
return !$this->isNew() && $this->getOldestRevertedRevisionId();
@@ -233,8 +227,6 @@ class EditResult implements JsonSerializable {
/**
* Whether the edit was an exact revert,
* i.e. the contents of the revert revision and restored revision match
- *
- * @return bool
*/
public function isExactRevert(): bool {
return $this->isExactRevert;
@@ -243,8 +235,6 @@ class EditResult implements JsonSerializable {
/**
* An edit is a null edit if the original revision is equal to the parent revision,
* i.e. no changes were made.
- *
- * @return bool
*/
public function isNullEdit(): bool {
return $this->isNullEdit;
diff --git a/includes/Storage/EditResultBuilder.php b/includes/Storage/EditResultBuilder.php
index 11ed570a40d4..c75cf03291ab 100644
--- a/includes/Storage/EditResultBuilder.php
+++ b/includes/Storage/EditResultBuilder.php
@@ -128,8 +128,6 @@ class EditResultBuilder {
/**
* Set the revision associated with this edit.
* Should only be called by PageUpdater when saving an edit.
- *
- * @param RevisionRecord $revisionRecord
*/
public function setRevisionRecord( RevisionRecord $revisionRecord ) {
$this->revisionRecord = $revisionRecord;
@@ -138,8 +136,6 @@ class EditResultBuilder {
/**
* Set whether the edit created a new page.
* Should only be called by PageUpdater when saving an edit.
- *
- * @param bool $isNew
*/
public function setIsNew( bool $isNew ) {
$this->isNew = $isNew;
@@ -289,8 +285,6 @@ class EditResultBuilder {
/**
* Whether the edit was an exact revert, i.e. the contents of the revert
* revision and restored revision match
- *
- * @return bool
*/
private function isExactRevert(): bool {
if ( $this->isNew || $this->oldestRevertedRevId === null ) {
@@ -308,8 +302,6 @@ class EditResultBuilder {
/**
* An edit is a null edit if the original revision is equal to the parent revision.
- *
- * @return bool
*/
private function isNullEdit(): bool {
if ( $this->isNew ) {
diff --git a/includes/Storage/PageUpdateStatus.php b/includes/Storage/PageUpdateStatus.php
index 89c2868c27ad..2a518c915270 100644
--- a/includes/Storage/PageUpdateStatus.php
+++ b/includes/Storage/PageUpdateStatus.php
@@ -62,8 +62,6 @@ class PageUpdateStatus extends Status {
* or because the content didn't change (null edit or derived slot update).
*
* Call isOK() to distinguish these cases.
- *
- * @return ?RevisionRecord
*/
public function getNewRevision(): ?RevisionRecord {
if ( !$this->isOK() ) {
@@ -78,8 +76,6 @@ class PageUpdateStatus extends Status {
* If this returns false even though isOK() returns true, this means that
* no new revision was created because the content didn't change,
* including updates to derived slots.
- *
- * @return bool
*/
public function wasRevisionCreated(): bool {
return $this->getNewRevision() !== null;
@@ -87,7 +83,6 @@ class PageUpdateStatus extends Status {
/**
* Whether the update created the page.
- * @return bool
*/
public function wasPageCreated(): bool {
return $this->wasRevisionCreated()
@@ -96,7 +91,6 @@ class PageUpdateStatus extends Status {
/**
* Whether the update failed because page creation was required, but the page already exists.
- * @return bool
*/
public function failedBecausePageExists(): bool {
return !$this->isOK() && $this->hasMessage( 'edit-already-exists' );
@@ -104,7 +98,6 @@ class PageUpdateStatus extends Status {
/**
* Whether the update failed because page modification was required, but the page does not exist.
- * @return bool
*/
public function failedBecausePageMissing(): bool {
return !$this->isOK() && $this->hasMessage( 'edit-gone-missing' );
@@ -112,7 +105,6 @@ class PageUpdateStatus extends Status {
/**
* Whether the update failed because a conflicting update happened concurrently.
- * @return bool
*/
public function failedBecauseOfConflict(): bool {
return !$this->isOK() && $this->hasMessage( 'edit-conflict' );
diff --git a/includes/Storage/PageUpdater.php b/includes/Storage/PageUpdater.php
index 60de481c8881..d4fd6e93e118 100644
--- a/includes/Storage/PageUpdater.php
+++ b/includes/Storage/PageUpdater.php
@@ -455,7 +455,6 @@ class PageUpdater {
/**
* Get the page we're currently updating.
- * @return PageIdentity
*/
public function getPage(): PageIdentity {
return $this->pageIdentity;
@@ -1709,10 +1708,6 @@ class PageUpdater {
}
}
- /**
- * @param array $roles
- * @param PageUpdateStatus $status
- */
private function checkAllRolesAllowed( array $roles, PageUpdateStatus $status ) {
$allowedRoles = $this->getAllowedSlotRoles();
@@ -1726,10 +1721,6 @@ class PageUpdater {
}
}
- /**
- * @param array $roles
- * @param PageUpdateStatus $status
- */
private function checkAllRolesDerived( array $roles, PageUpdateStatus $status ) {
$notDerived = array_filter(
$roles,
@@ -1746,10 +1737,6 @@ class PageUpdater {
}
}
- /**
- * @param array $roles
- * @param PageUpdateStatus $status
- */
private function checkNoRolesRequired( array $roles, PageUpdateStatus $status ) {
$requiredRoles = $this->getRequiredSlotRoles();
@@ -1763,10 +1750,6 @@ class PageUpdater {
}
}
- /**
- * @param array $roles
- * @param PageUpdateStatus $status
- */
private function checkAllRequiredRoles( array $roles, PageUpdateStatus $status ) {
$requiredRoles = $this->getRequiredSlotRoles();
diff --git a/includes/Storage/PageUpdaterFactory.php b/includes/Storage/PageUpdaterFactory.php
index 0e142fa5cfc5..f3378b4491ce 100644
--- a/includes/Storage/PageUpdaterFactory.php
+++ b/includes/Storage/PageUpdaterFactory.php
@@ -141,7 +141,6 @@ class PageUpdaterFactory {
/** @var string[] */
private $softwareTags;
- /** @var ChangeTagsStore */
private ChangeTagsStore $changeTagsStore;
/**
diff --git a/includes/Storage/RevertedTagUpdate.php b/includes/Storage/RevertedTagUpdate.php
index fd90e8cd4da8..b67a3e030580 100644
--- a/includes/Storage/RevertedTagUpdate.php
+++ b/includes/Storage/RevertedTagUpdate.php
@@ -166,8 +166,6 @@ class RevertedTagUpdate implements DeferrableUpdate {
/**
* Performs checks to determine whether the update should execute.
- *
- * @return bool
*/
private function shouldExecute(): bool {
$maxDepth = $this->options->get( MainConfigNames::RevertedTagMaxDepth );
@@ -251,8 +249,6 @@ class RevertedTagUpdate implements DeferrableUpdate {
*
* This is a much simpler case requiring less DB queries than when dealing with multiple
* reverted edits.
- *
- * @return bool
*/
private function handleSingleRevertedEdit(): bool {
if ( $this->editResult->getOldestRevertedRevisionId() !==
@@ -293,8 +289,6 @@ class RevertedTagUpdate implements DeferrableUpdate {
* Returns additional data to be saved in ct_params field of table 'change_tag'.
*
* Effectively a superset of what EditResult::jsonSerialize() returns.
- *
- * @return array
*/
private function getTagExtraParams(): array {
return array_merge(
diff --git a/includes/Storage/RevertedTagUpdateManager.php b/includes/Storage/RevertedTagUpdateManager.php
index 860c7c110df4..60ef8c1b5e8c 100644
--- a/includes/Storage/RevertedTagUpdateManager.php
+++ b/includes/Storage/RevertedTagUpdateManager.php
@@ -40,10 +40,6 @@ class RevertedTagUpdateManager {
/** @var EditResultCache */
private $editResultCache;
- /**
- * @param EditResultCache $editResultCache
- * @param JobQueueGroup $jobQueueGroup
- */
public function __construct(
EditResultCache $editResultCache,
JobQueueGroup $jobQueueGroup
diff --git a/includes/Storage/RevisionSlotsUpdate.php b/includes/Storage/RevisionSlotsUpdate.php
index 76f8f1d38eab..21bdc4ad80cd 100644
--- a/includes/Storage/RevisionSlotsUpdate.php
+++ b/includes/Storage/RevisionSlotsUpdate.php
@@ -162,8 +162,6 @@ class RevisionSlotsUpdate {
*
* The roles used with modifySlot() will be returned from getModifiedRoles(),
* unless overwritten with removeSlot().
- *
- * @param SlotRecord $slot
*/
public function modifySlot( SlotRecord $slot ) {
$role = $slot->getRole();
@@ -286,8 +284,6 @@ class RevisionSlotsUpdate {
/**
* Applies this update to the given MutableRevisionSlots, setting all modified slots,
* and removing all removed roles.
- *
- * @param MutableRevisionSlots $slots
*/
public function apply( MutableRevisionSlots $slots ) {
foreach ( $this->getModifiedRoles() as $role ) {
diff --git a/includes/actions/ActionEntryPoint.php b/includes/actions/ActionEntryPoint.php
index 74751bc75166..74bfa6d9f3fb 100644
--- a/includes/actions/ActionEntryPoint.php
+++ b/includes/actions/ActionEntryPoint.php
@@ -42,7 +42,6 @@ class ActionEntryPoint extends MediaWikiEntryPoint {
/**
* Overwritten to narrow the return type to RequestContext
- * @return RequestContext
*/
protected function getContext(): RequestContext {
/** @var RequestContext $context */
diff --git a/includes/actions/DeleteAction.php b/includes/actions/DeleteAction.php
index ecb18d041d4d..74e7d244d49c 100644
--- a/includes/actions/DeleteAction.php
+++ b/includes/actions/DeleteAction.php
@@ -597,8 +597,6 @@ class DeleteAction extends FormAction {
/**
* Default reason to be used for the deletion form
- *
- * @return string
*/
protected function getDefaultReason(): string {
$requestReason = $this->getRequest()->getText( 'wpReason' );
diff --git a/includes/api/ApiContinuationManager.php b/includes/api/ApiContinuationManager.php
index 0a6e84f52b4f..1a7bcea4f395 100644
--- a/includes/api/ApiContinuationManager.php
+++ b/includes/api/ApiContinuationManager.php
@@ -265,7 +265,6 @@ class ApiContinuationManager {
/**
* Store the continuation data into the result
- * @param ApiResult $result
*/
public function setContinuationIntoResult( ApiResult $result ) {
[ $data, $batchcomplete ] = $this->getContinuation();
diff --git a/includes/api/ApiCreateTempUserTrait.php b/includes/api/ApiCreateTempUserTrait.php
index 3d36fa6e531d..41dc104ae286 100644
--- a/includes/api/ApiCreateTempUserTrait.php
+++ b/includes/api/ApiCreateTempUserTrait.php
@@ -50,8 +50,6 @@ trait ApiCreateTempUserTrait {
/**
* Add params needed for TempUserCreatedRedirectHook.
- *
- * @return array
*/
protected function getCreateTempUserParams(): array {
return [
diff --git a/includes/api/ApiEntryPoint.php b/includes/api/ApiEntryPoint.php
index c9ae63aa179c..1f854a881075 100644
--- a/includes/api/ApiEntryPoint.php
+++ b/includes/api/ApiEntryPoint.php
@@ -63,7 +63,6 @@ class ApiEntryPoint extends MediaWikiEntryPoint {
/**
* Overwritten to narrow the return type to RequestContext
- * @return RequestContext
*/
protected function getContext(): RequestContext {
/** @var RequestContext $context */
diff --git a/includes/api/ApiErrorFormatter.php b/includes/api/ApiErrorFormatter.php
index d8c9b46016fd..3bfdfb198e6d 100644
--- a/includes/api/ApiErrorFormatter.php
+++ b/includes/api/ApiErrorFormatter.php
@@ -127,7 +127,6 @@ class ApiErrorFormatter {
/**
* Fetch a dummy title to set on Messages
- * @return PageReference
*/
protected function getDummyTitle(): PageReference {
if ( self::$dummyTitle === null ) {
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index 91626c63d17d..55ff1f32dff4 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -775,10 +775,6 @@ class ApiMain extends ApiBase {
$this->mContinuationManager = $manager;
}
- /**
- * Get the parameter validator
- * @return ApiParamValidator
- */
public function getParamValidator(): ApiParamValidator {
return $this->mParamValidator;
}
@@ -1988,7 +1984,6 @@ class ApiMain extends ApiBase {
/**
* Set database connection, query, and write expectations given this module request
- * @param ApiBase $module
*/
protected function setRequestExpectations( ApiBase $module ) {
$request = $this->getRequest();
diff --git a/includes/api/ApiOptionsBase.php b/includes/api/ApiOptionsBase.php
index dd0e4d28c489..0d49050ec423 100644
--- a/includes/api/ApiOptionsBase.php
+++ b/includes/api/ApiOptionsBase.php
@@ -260,8 +260,6 @@ abstract class ApiOptionsBase extends ApiBase {
/**
* Load the user from the primary to reduce CAS errors on double post (T95839)
* Will throw if the user is anonymous.
- *
- * @return User
*/
protected function getUserForUpdates(): User {
// @phan-suppress-next-line PhanTypeMismatchReturnNullable
diff --git a/includes/api/ApiRollback.php b/includes/api/ApiRollback.php
index 1c5f3ca47f96..808f17c07854 100644
--- a/includes/api/ApiRollback.php
+++ b/includes/api/ApiRollback.php
@@ -176,11 +176,6 @@ class ApiRollback extends ApiBase {
return 'rollback';
}
- /**
- * @param array $params
- *
- * @return UserIdentity
- */
private function getRbUser( array $params ): UserIdentity {
if ( $this->mUser !== null ) {
return $this->mUser;
diff --git a/includes/api/IApiMessage.php b/includes/api/IApiMessage.php
index 0a9da276bfc3..efa6f78e84c8 100644
--- a/includes/api/IApiMessage.php
+++ b/includes/api/IApiMessage.php
@@ -67,7 +67,6 @@ interface IApiMessage extends MessageSpecifier {
/**
* Sets additional machine-readable data about the error condition
- * @param array $data
*/
public function setApiData( array $data );
}
diff --git a/includes/auth/PrimaryAuthenticationProvider.php b/includes/auth/PrimaryAuthenticationProvider.php
index 0f4e58513681..36ab637d2ccb 100644
--- a/includes/auth/PrimaryAuthenticationProvider.php
+++ b/includes/auth/PrimaryAuthenticationProvider.php
@@ -224,8 +224,6 @@ interface PrimaryAuthenticationProvider extends AuthenticationProvider {
* It can be assumed that providerAllowsAuthenticationDataChange with $checkData === true
* was called before this, and passed. This method should never fail (other than throwing an
* exception).
- *
- * @param AuthenticationRequest $req
*/
public function providerChangeAuthenticationData( AuthenticationRequest $req );
diff --git a/includes/auth/SecondaryAuthenticationProvider.php b/includes/auth/SecondaryAuthenticationProvider.php
index f635c5a40407..f3e5f289f33d 100644
--- a/includes/auth/SecondaryAuthenticationProvider.php
+++ b/includes/auth/SecondaryAuthenticationProvider.php
@@ -148,8 +148,6 @@ interface SecondaryAuthenticationProvider extends AuthenticationProvider {
* It can be assumed that providerAllowsAuthenticationDataChange with $checkData === true
* was called before this, and passed. This method should never fail (other than throwing an
* exception).
- *
- * @param AuthenticationRequest $req
*/
public function providerChangeAuthenticationData( AuthenticationRequest $req );
diff --git a/includes/block/BlockCache.php b/includes/block/BlockCache.php
index 035d04f0b3fd..255e0a1946fc 100644
--- a/includes/block/BlockCache.php
+++ b/includes/block/BlockCache.php
@@ -40,8 +40,6 @@ class BlockCache {
/**
* Clear all block cache entries associated with a user
- *
- * @param UserIdentity $user
*/
public function clearUser( UserIdentity $user ) {
foreach ( $this->cache as $partialKey => $entry ) {
diff --git a/includes/block/BlockCacheKey.php b/includes/block/BlockCacheKey.php
index e275204f874f..2b182400c43f 100644
--- a/includes/block/BlockCacheKey.php
+++ b/includes/block/BlockCacheKey.php
@@ -77,8 +77,6 @@ class BlockCacheKey implements Stringable {
/**
* Get the bucket for the cache entry associated with this key.
* Entries with the same partial key will replace each other in the cache.
- *
- * @return string
*/
public function getPartialKey(): string {
if ( $this->hasRequest ) {
@@ -120,8 +118,6 @@ class BlockCacheKey implements Stringable {
/**
* Convert to a string, for debugging
- *
- * @return string
*/
public function __toString(): string {
return 'BlockCacheKey{' .
diff --git a/includes/block/BlockManager.php b/includes/block/BlockManager.php
index 73e3b58aa7c7..630bf20513fb 100644
--- a/includes/block/BlockManager.php
+++ b/includes/block/BlockManager.php
@@ -228,8 +228,6 @@ class BlockManager {
/**
* Clear the cache of any blocks that refer to the specified user
- *
- * @param UserIdentity $user
*/
public function clearUserCache( UserIdentity $user ) {
$this->userBlockCache->clearUser( $user );
diff --git a/includes/block/BlockUser.php b/includes/block/BlockUser.php
index a01d8078cdc4..d3741b983a92 100644
--- a/includes/block/BlockUser.php
+++ b/includes/block/BlockUser.php
@@ -341,8 +341,6 @@ class BlockUser {
/**
* Is the to-be-placed block partial?
- *
- * @return bool
*/
private function isPartial(): bool {
return $this->blockRestrictions !== [] || $this->isPartialRaw;
@@ -755,8 +753,6 @@ class BlockUser {
* Prepare $logParams
*
* Helper method for $this->log()
- *
- * @return array
*/
private function constructLogParams(): array {
$logExpiry = wfIsInfinity( $this->rawExpiry ) ? 'infinity' : $this->rawExpiry;
@@ -812,8 +808,6 @@ class BlockUser {
/**
* Log the block to Special:Log
- *
- * @param ManualLogEntry $logEntry
*/
private function log( ManualLogEntry $logEntry ) {
$logId = $logEntry->insert();
@@ -823,8 +817,6 @@ class BlockUser {
/**
* Return a comma-delimited list of flags to be passed to the log
* reader for this block, to provide more information in the logs.
- *
- * @return string
*/
private function blockLogFlags(): string {
$flags = [];
diff --git a/includes/block/DatabaseBlock.php b/includes/block/DatabaseBlock.php
index 51f80f7acb61..605097d0d530 100644
--- a/includes/block/DatabaseBlock.php
+++ b/includes/block/DatabaseBlock.php
@@ -681,11 +681,6 @@ class DatabaseBlock extends AbstractBlock {
return null;
}
- /**
- * Get a BlockRestrictionStore instance
- *
- * @return BlockRestrictionStore
- */
private function getBlockRestrictionStore(): BlockRestrictionStore {
// TODO: get rid of global state here
return MediaWikiServices::getInstance()
diff --git a/includes/block/UnblockUser.php b/includes/block/UnblockUser.php
index 66bdc261178b..5af1378c86f7 100644
--- a/includes/block/UnblockUser.php
+++ b/includes/block/UnblockUser.php
@@ -123,8 +123,6 @@ class UnblockUser {
/**
* Unblock user
- *
- * @return Status
*/
public function unblock(): Status {
$status = Status::newGood();
diff --git a/includes/cache/BacklinkCache.php b/includes/cache/BacklinkCache.php
index 16f942a9cb63..9714b01906f3 100644
--- a/includes/cache/BacklinkCache.php
+++ b/includes/cache/BacklinkCache.php
@@ -474,8 +474,6 @@ class BacklinkCache {
* Modify an array of batches, setting the start of the first batch to
* false, and the end of the last batch to false, so that the complete
* set of batches covers the entire ID range from 0 to infinity.
- *
- * @param array &$batches
*/
private function openBatchEnds( array &$batches ) {
if ( !count( $batches ) ) {
diff --git a/includes/collation/CollationFactory.php b/includes/collation/CollationFactory.php
index 68f6bcbbd34d..2340e2fd607b 100644
--- a/includes/collation/CollationFactory.php
+++ b/includes/collation/CollationFactory.php
@@ -133,10 +133,6 @@ class CollationFactory {
return $this->options->get( MainConfigNames::CategoryCollation );
}
- /**
- * @param string $collationName
- * @return Collation
- */
public function makeCollation( string $collationName ): Collation {
if ( isset( self::CORE_COLLATIONS[$collationName] ) ) {
return $this->instantiateCollation( self::CORE_COLLATIONS[$collationName] );
diff --git a/includes/content/ContentHandlerFactory.php b/includes/content/ContentHandlerFactory.php
index b132d8f2d152..65f808e977d6 100644
--- a/includes/content/ContentHandlerFactory.php
+++ b/includes/content/ContentHandlerFactory.php
@@ -152,11 +152,6 @@ final class ContentHandlerFactory implements IContentHandlerFactory {
return array_keys( $formats );
}
- /**
- * @param string $modelID
- *
- * @return bool
- */
public function isDefinedModel( string $modelID ): bool {
return in_array( $modelID, $this->getContentModels(), true );
}
diff --git a/includes/content/Renderer/ContentRenderer.php b/includes/content/Renderer/ContentRenderer.php
index fed257606998..0a77a82a505e 100644
--- a/includes/content/Renderer/ContentRenderer.php
+++ b/includes/content/Renderer/ContentRenderer.php
@@ -20,10 +20,6 @@ class ContentRenderer {
private GlobalIdGenerator $globalIdGenerator;
- /**
- * @param IContentHandlerFactory $contentHandlerFactory
- * @param GlobalIdGenerator $globalIdGenerator
- */
public function __construct(
IContentHandlerFactory $contentHandlerFactory,
GlobalIdGenerator $globalIdGenerator
diff --git a/includes/context/RequestContext.php b/includes/context/RequestContext.php
index 264431723f05..2ea1f29b8337 100644
--- a/includes/context/RequestContext.php
+++ b/includes/context/RequestContext.php
@@ -606,8 +606,6 @@ class RequestContext implements IContextSource, MutableContext {
/**
* Get the RequestContext object associated with the main request
- *
- * @return RequestContext
*/
public static function getMain(): RequestContext {
self::$instance ??= new self;
diff --git a/includes/deferred/DeferredUpdatesScopeStack.php b/includes/deferred/DeferredUpdatesScopeStack.php
index 493793927eaf..4bd904cf2319 100644
--- a/includes/deferred/DeferredUpdatesScopeStack.php
+++ b/includes/deferred/DeferredUpdatesScopeStack.php
@@ -82,8 +82,6 @@ class DeferredUpdatesScopeStack {
/**
* Whether DeferredUpdates::addUpdate() may run the update right away
- *
- * @return bool
*/
public function allowOpportunisticUpdates(): bool {
// Overridden in DeferredUpdatesScopeMediaWikiStack::allowOpportunisticUpdates
diff --git a/includes/deferred/LinksUpdate/LinksTable.php b/includes/deferred/LinksUpdate/LinksTable.php
index 9c2bb97aa4a8..13c384eb8933 100644
--- a/includes/deferred/LinksUpdate/LinksTable.php
+++ b/includes/deferred/LinksUpdate/LinksTable.php
@@ -139,8 +139,6 @@ abstract class LinksTable {
/**
* Set the revision associated with the edit.
- *
- * @param RevisionRecord $revision
*/
public function setRevision( RevisionRecord $revision ) {
$this->revision = $revision;
@@ -149,8 +147,6 @@ abstract class LinksTable {
/**
* Notify the object that the operation is a page move, and set the
* original title.
- *
- * @param PageReference $movedPage
*/
public function setMoveDetails( PageReference $movedPage ) {
$this->movedPage = $movedPage;
@@ -162,8 +158,6 @@ abstract class LinksTable {
*
* To support a future refactor of LinksDeletionUpdate, if this method is
* not called, the subclass should assume that the new state is empty.
- *
- * @param ParserOutput $parserOutput
*/
abstract public function setParserOutput( ParserOutput $parserOutput );
@@ -268,8 +262,6 @@ abstract class LinksTable {
/**
* Get the page_id of the source page
- *
- * @return int
*/
protected function getSourcePageId(): int {
return $this->sourcePage->getId();
@@ -278,8 +270,6 @@ abstract class LinksTable {
/**
* Get the source page, i.e. the page which is being updated and is the
* source of links.
- *
- * @return PageIdentity
*/
protected function getSourcePage(): PageIdentity {
return $this->sourcePage;
@@ -307,8 +297,6 @@ abstract class LinksTable {
/**
* Assuming the page was moved, get the original page title before the move.
* This will throw an exception if the page wasn't moved.
- *
- * @return PageReference
*/
protected function getMovedPage(): PageReference {
return $this->movedPage;
@@ -316,8 +304,6 @@ abstract class LinksTable {
/**
* Get the maximum number of rows to update in a batch.
- *
- * @return int
*/
protected function getBatchSize(): int {
return $this->batchSize;
@@ -355,8 +341,6 @@ abstract class LinksTable {
/**
* Do a select query to fetch the existing rows. This is a helper for
* subclasses.
- *
- * @return IResultWrapper
*/
protected function fetchExistingRows(): IResultWrapper {
return $this->getDB()->newSelectQueryBuilder()
@@ -534,7 +518,6 @@ abstract class LinksTable {
/**
* Normalization stage of the links table (see T222224)
- * @return int
*/
protected function linksTargetNormalizationStage(): int {
return SCHEMA_COMPAT_OLD;
diff --git a/includes/deferred/LinksUpdate/LinksTableGroup.php b/includes/deferred/LinksUpdate/LinksTableGroup.php
index a494d17299c1..f24184e6a896 100644
--- a/includes/deferred/LinksUpdate/LinksTableGroup.php
+++ b/includes/deferred/LinksUpdate/LinksTableGroup.php
@@ -136,8 +136,6 @@ class LinksTableGroup {
/**
* Set the ParserOutput object to be used in new and existing objects.
- *
- * @param ParserOutput $parserOutput
*/
public function setParserOutput( ParserOutput $parserOutput ) {
$this->parserOutput = $parserOutput;
@@ -148,8 +146,6 @@ class LinksTableGroup {
/**
* Set the original title in the case of a page move.
- *
- * @param PageReference $oldPage
*/
public function setMoveDetails( PageReference $oldPage ) {
$this->movedPage = $oldPage;
@@ -172,8 +168,6 @@ class LinksTableGroup {
/**
* Set the revision to be used in new and existing objects.
- *
- * @param RevisionRecord $revision
*/
public function setRevision( RevisionRecord $revision ) {
$this->revision = $revision;
diff --git a/includes/deferred/LinksUpdate/LinksUpdate.php b/includes/deferred/LinksUpdate/LinksUpdate.php
index b4c5e3bbbaa9..6e570d573316 100644
--- a/includes/deferred/LinksUpdate/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate/LinksUpdate.php
@@ -131,8 +131,6 @@ class LinksUpdate extends DataUpdate {
/**
* Notify LinksUpdate that a move has just been completed and set the
* original title
- *
- * @param PageReference $oldPage
*/
public function setMoveDetails( PageReference $oldPage ) {
$this->tableFactory->setMoveDetails( $oldPage );
diff --git a/includes/deferred/LinksUpdate/PageLinksTable.php b/includes/deferred/LinksUpdate/PageLinksTable.php
index aa3f0886b9c1..9653f619dc7d 100644
--- a/includes/deferred/LinksUpdate/PageLinksTable.php
+++ b/includes/deferred/LinksUpdate/PageLinksTable.php
@@ -63,7 +63,6 @@ class PageLinksTable extends GenericPageLinksTable {
/**
* Normalization stage of the links table (see T222224)
- * @return int
*/
protected function linksTargetNormalizationStage(): int {
return $this->migrationStage;
diff --git a/includes/deferred/LinksUpdate/TemplateLinksTable.php b/includes/deferred/LinksUpdate/TemplateLinksTable.php
index eafae6748971..e09541193e32 100644
--- a/includes/deferred/LinksUpdate/TemplateLinksTable.php
+++ b/includes/deferred/LinksUpdate/TemplateLinksTable.php
@@ -51,7 +51,6 @@ class TemplateLinksTable extends GenericPageLinksTable {
/**
* Normalization stage of the links table (see T222224)
- * @return int
*/
protected function linksTargetNormalizationStage(): int {
return MIGRATION_NEW;
diff --git a/includes/diff/TextDiffer/ManifoldTextDiffer.php b/includes/diff/TextDiffer/ManifoldTextDiffer.php
index b12647235a02..ef959b1187e4 100644
--- a/includes/diff/TextDiffer/ManifoldTextDiffer.php
+++ b/includes/diff/TextDiffer/ManifoldTextDiffer.php
@@ -157,8 +157,6 @@ class ManifoldTextDiffer implements TextDiffer {
/**
* Disable text differs apart from the one with the given name.
- *
- * @param string $name
*/
public function setEngine( string $name ) {
$this->diffEngine = $name;
@@ -212,8 +210,6 @@ class ManifoldTextDiffer implements TextDiffer {
/**
* Initialize an object which may be a subclass of BaseTextDiffer, passing
* down injected dependencies.
- *
- * @param TextDiffer $differ
*/
public function injectDeps( TextDiffer $differ ) {
if ( $differ instanceof BaseTextDiffer ) {
diff --git a/includes/edit/ParsoidRenderID.php b/includes/edit/ParsoidRenderID.php
index 005da7b305c8..1a08dc7903e6 100644
--- a/includes/edit/ParsoidRenderID.php
+++ b/includes/edit/ParsoidRenderID.php
@@ -91,8 +91,6 @@ class ParsoidRenderID implements Stringable {
/**
* This returns the canonical string representation from
* the parsoid render ID which can be used to in newFromString().
- *
- * @return string
*/
public function getKey(): string {
return $this->stashKey;
@@ -104,8 +102,6 @@ class ParsoidRenderID implements Stringable {
/**
* Get the revision ID from the parsoid render ID object.
- *
- * @return int
*/
public function getRevisionID(): int {
return $this->revisionID;
@@ -113,8 +109,6 @@ class ParsoidRenderID implements Stringable {
/**
* Get the unique identifier from the parsoid render ID object.
- *
- * @return string
*/
public function getUniqueID(): string {
return $this->uniqueID;
diff --git a/includes/edit/SelserContext.php b/includes/edit/SelserContext.php
index 21cf5e22d307..114c21b00f90 100644
--- a/includes/edit/SelserContext.php
+++ b/includes/edit/SelserContext.php
@@ -48,9 +48,6 @@ class SelserContext {
return $this->revId;
}
- /**
- * @return Content|null
- */
public function getContent(): ?Content {
return $this->content;
}
diff --git a/includes/editpage/Constraint/AccidentalRecreationConstraint.php b/includes/editpage/Constraint/AccidentalRecreationConstraint.php
index 2ac6ca7a211c..e27ce90d8bc8 100644
--- a/includes/editpage/Constraint/AccidentalRecreationConstraint.php
+++ b/includes/editpage/Constraint/AccidentalRecreationConstraint.php
@@ -34,10 +34,6 @@ class AccidentalRecreationConstraint implements IEditConstraint {
private bool $deletedSinceLastEdit;
private bool $allowRecreation;
- /**
- * @param bool $deletedSinceLastEdit
- * @param bool $allowRecreation
- */
public function __construct(
bool $deletedSinceLastEdit,
bool $allowRecreation
diff --git a/includes/editpage/Constraint/EditConstraintRunner.php b/includes/editpage/Constraint/EditConstraintRunner.php
index 51ab407e21db..5ec10b7a2e2a 100644
--- a/includes/editpage/Constraint/EditConstraintRunner.php
+++ b/includes/editpage/Constraint/EditConstraintRunner.php
@@ -67,8 +67,6 @@ class EditConstraintRunner {
* an edit
*
* For constraints that have dependencies, use the EditConstraintFactory.
- *
- * @param IEditConstraint $constraint
*/
public function addConstraint( IEditConstraint $constraint ) {
$this->constraints[] = $constraint;
@@ -79,8 +77,6 @@ class EditConstraintRunner {
*
* Returns true if all constraints pass, false otherwise.
* Check getLegacyStatus for the reason
- *
- * @return bool
*/
public function checkConstraints(): bool {
foreach ( $this->constraints as $constraint ) {
@@ -111,10 +107,6 @@ class EditConstraintRunner {
return true;
}
- /**
- * @param IEditConstraint $constraint
- * @return string
- */
private function getConstraintName( IEditConstraint $constraint ): string {
// Used for debug logging
$fullClassName = explode( '\\', get_class( $constraint ) );
@@ -131,8 +123,6 @@ class EditConstraintRunner {
/**
* Get the constraint that failed
- *
- * @return IEditConstraint
*/
public function getFailedConstraint(): IEditConstraint {
Assert::precondition(
diff --git a/includes/editpage/Constraint/MissingCommentConstraint.php b/includes/editpage/Constraint/MissingCommentConstraint.php
index 98b461b8f5ce..e0abc6efc295 100644
--- a/includes/editpage/Constraint/MissingCommentConstraint.php
+++ b/includes/editpage/Constraint/MissingCommentConstraint.php
@@ -34,10 +34,6 @@ class MissingCommentConstraint implements IEditConstraint {
private string $section;
private string $userComment;
- /**
- * @param string $section
- * @param string $userComment
- */
public function __construct( string $section, string $userComment ) {
$this->section = $section;
$this->userComment = $userComment;
diff --git a/includes/editpage/EditPage.php b/includes/editpage/EditPage.php
index a7fe0536561f..d492ce5a0b3c 100644
--- a/includes/editpage/EditPage.php
+++ b/includes/editpage/EditPage.php
@@ -829,8 +829,6 @@ class EditPage implements IEditObject {
* This is a helper for internalAttemptSavePrivate().
*
* If the edit is a null edit, the user will not be created.
- *
- * @return Status
*/
private function createTempUser(): Status {
if ( !$this->tempUserCreateActive ) {
@@ -858,8 +856,6 @@ class EditPage implements IEditObject {
* are unsuitable for anything that uses or exposes the name, like
* throttling. The only thing a placeholder user is good for is fooling the
* permissions system into allowing edits by anons.
- *
- * @return Authority
*/
private function getAuthority(): Authority {
return $this->getUserForPermissions();
@@ -2593,8 +2589,6 @@ class EditPage implements IEditObject {
* failed, rather than interspersing this logic throughout internalAttemptSavePrivate at
* each of the points the constraints are checked. Eventually, this will act on the
* result from the backend.
- *
- * @param IEditConstraint $failed
*/
private function handleFailedConstraint( IEditConstraint $failed ): void {
if ( $failed instanceof PageSizeConstraint ) {
@@ -3977,7 +3971,6 @@ class EditPage implements IEditObject {
* Note that we rely on the logging table, which hasn't been always there,
* but that doesn't matter, because this only applies to brand new
* deletes.
- * @return bool
*/
private function wasDeletedSinceLastEdit(): bool {
if ( $this->deletedSinceEdit !== null ) {
@@ -4458,8 +4451,6 @@ class EditPage implements IEditObject {
/**
* Get the message key of the label for the button to save the page
- *
- * @return string
*/
private function getSubmitButtonLabel(): string {
$labelAsPublish =
diff --git a/includes/exception/MWExceptionHandler.php b/includes/exception/MWExceptionHandler.php
index 4ddb430b2267..5ec59fa99758 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -121,7 +121,6 @@ class MWExceptionHandler {
/**
* Report a throwable to the user
- * @param Throwable $e
*/
protected static function report( Throwable $e ) {
try {
diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php
index 9df5838740f4..335c1d04a84d 100644
--- a/includes/exception/MWExceptionRenderer.php
+++ b/includes/exception/MWExceptionRenderer.php
@@ -172,8 +172,6 @@ class MWExceptionRenderer {
/**
* Output the throwable report using HTML
- *
- * @param Throwable $e
*/
private static function reportHTML( Throwable $e ) {
if ( self::useOutputPage( $e ) ) {
diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index 05e76ca5320a..8427616797ef 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -667,8 +667,6 @@ class LocalRepo extends FileRepo {
/**
* Get a BlobStore for storing and retrieving large metadata, or null if
* that can't be done.
- *
- * @return ?BlobStore
*/
public function getBlobStore(): ?BlobStore {
if ( !$this->blobStore ) {
diff --git a/includes/filerepo/file/LocalFileMoveBatch.php b/includes/filerepo/file/LocalFileMoveBatch.php
index 642a6b0aeb9d..4a2f0aa73301 100644
--- a/includes/filerepo/file/LocalFileMoveBatch.php
+++ b/includes/filerepo/file/LocalFileMoveBatch.php
@@ -82,10 +82,6 @@ class LocalFileMoveBatch {
/** @var LocalFile|null */
private $targetFile;
- /**
- * @param LocalFile $file
- * @param Title $target
- */
public function __construct( LocalFile $file, Title $target ) {
$this->file = $file;
$this->target = $target;
diff --git a/includes/filerepo/file/MetadataStorageHelper.php b/includes/filerepo/file/MetadataStorageHelper.php
index e752353e39e3..5586af5693d3 100644
--- a/includes/filerepo/file/MetadataStorageHelper.php
+++ b/includes/filerepo/file/MetadataStorageHelper.php
@@ -102,10 +102,6 @@ class MetadataStorageHelper {
return $s;
}
- /**
- * @param array $addresses
- * @return array
- */
public function getMetadataFromBlobStore( array $addresses ): array {
$result = [];
if ( $addresses ) {
diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index dec8d43c1828..37f1a82d5e42 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -1369,7 +1369,6 @@ class HTMLForm extends ContextSource {
/**
* Get a hidden field for the title of the page if necessary (empty string otherwise)
- * @return string
*/
private function getHiddenTitle(): string {
if ( $this->hiddenTitleAddedToForm ) {
diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php
index 4ff5320f2c9d..f9a7ab97658a 100644
--- a/includes/http/MWHttpRequest.php
+++ b/includes/http/MWHttpRequest.php
@@ -566,8 +566,6 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
* Tells the MWHttpRequest object to use this pre-loaded CookieJar.
*
* To read response cookies from the jar, getCookieJar must be called first.
- *
- * @param CookieJar $jar
*/
public function setCookieJar( CookieJar $jar ) {
$this->cookieJar = $jar;
diff --git a/includes/http/Telemetry.php b/includes/http/Telemetry.php
index bd26f80ca426..9ab7e74f866d 100644
--- a/includes/http/Telemetry.php
+++ b/includes/http/Telemetry.php
@@ -28,9 +28,6 @@ use Wikimedia\Http\TelemetryHeadersInterface;
*/
class Telemetry implements TelemetryHeadersInterface {
- /**
- * @var Telemetry|null
- */
private static ?Telemetry $instance = null;
/**
@@ -70,8 +67,6 @@ class Telemetry implements TelemetryHeadersInterface {
*
* This is usually based on the `X-Request-Id` header, or the `UNIQUE_ID`
* environment variable, falling back to (process cached) randomly-generated string.
- *
- * @return string
*/
public function getRequestId(): string {
// This method is called from various error handlers and MUST be kept simple and stateless.
@@ -91,8 +86,6 @@ class Telemetry implements TelemetryHeadersInterface {
/**
* Override the unique request ID. This is for sub-requests, such as jobs,
* that wish to use the same id but are not part of the same execution context.
- *
- * @param string $newId
*/
public function overrideRequestId( string $newId ): void {
$this->reqId = $newId;
@@ -129,7 +122,6 @@ class Telemetry implements TelemetryHeadersInterface {
/**
* Return Telemetry data in form of request headers
- * @return array
*/
public function getRequestHeaders(): array {
return array_filter( [
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index cb152668aa0a..41de0a5c227c 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -350,7 +350,6 @@ abstract class Installer {
/**
* Show a message to the installing user by using a Status object
- * @param Status $status
*/
abstract public function showStatusMessage( Status $status );
@@ -1476,8 +1475,6 @@ abstract class Installer {
/**
* Override the necessary bits of the config to run an installation.
- *
- * @param SettingsBuilder $settings
*/
public static function overrideConfig( SettingsBuilder $settings ) {
// Use PHP's built-in session handling, since MediaWiki's
diff --git a/includes/installer/MysqlSettingsForm.php b/includes/installer/MysqlSettingsForm.php
index 657494b94899..aa78abf40d99 100644
--- a/includes/installer/MysqlSettingsForm.php
+++ b/includes/installer/MysqlSettingsForm.php
@@ -90,7 +90,6 @@ class MysqlSettingsForm extends DatabaseSettingsForm {
/**
* Downcast the DatabaseInstaller
- * @return MysqlInstaller
*/
private function getMysqlInstaller(): MysqlInstaller {
// @phan-suppress-next-line PhanTypeMismatchReturnSuperType
diff --git a/includes/installer/Pingback.php b/includes/installer/Pingback.php
index f172ca22a338..b7b31dfac9ed 100644
--- a/includes/installer/Pingback.php
+++ b/includes/installer/Pingback.php
@@ -156,8 +156,6 @@ class Pingback {
/**
* Was a pingback sent in the last month for this MediaWiki version?
- *
- * @return bool
*/
private function wasRecentlySent(): bool {
$timestamp = $this->dbProvider->getReplicaDatabase()->newSelectQueryBuilder()
diff --git a/includes/installer/PostgresConnectForm.php b/includes/installer/PostgresConnectForm.php
index 65a0f474bdd8..d5f843bd7f2f 100644
--- a/includes/installer/PostgresConnectForm.php
+++ b/includes/installer/PostgresConnectForm.php
@@ -91,7 +91,6 @@ class PostgresConnectForm extends DatabaseConnectForm {
/**
* Downcast the DatabaseInstaller
- * @return PostgresInstaller
*/
private function getPostgresInstaller(): PostgresInstaller {
// @phan-suppress-next-line PhanTypeMismatchReturnSuperType
diff --git a/includes/installer/PostgresSettingsForm.php b/includes/installer/PostgresSettingsForm.php
index e8d64d798acf..f74136498b2d 100644
--- a/includes/installer/PostgresSettingsForm.php
+++ b/includes/installer/PostgresSettingsForm.php
@@ -88,7 +88,6 @@ class PostgresSettingsForm extends DatabaseSettingsForm {
/**
* Downcast the DatabaseInstaller
- * @return PostgresInstaller
*/
private function getPostgresInstaller(): PostgresInstaller {
// @phan-suppress-next-line PhanTypeMismatchReturnSuperType
diff --git a/includes/installer/Task/InitialContentTask.php b/includes/installer/Task/InitialContentTask.php
index 62d018e12c27..8dc548744c33 100644
--- a/includes/installer/Task/InitialContentTask.php
+++ b/includes/installer/Task/InitialContentTask.php
@@ -101,8 +101,6 @@ class InitialContentTask extends Task {
/**
* Get services from the restored service container
- *
- * @param MediaWikiServices $services
*/
private function initServices( MediaWikiServices $services ) {
$this->wikiPageFactory = $services->getWikiPageFactory();
diff --git a/includes/installer/Task/Task.php b/includes/installer/Task/Task.php
index 20653941953c..b36d02f5e6d1 100644
--- a/includes/installer/Task/Task.php
+++ b/includes/installer/Task/Task.php
@@ -165,8 +165,6 @@ abstract class Task {
/**
* Get the execution context. This will throw if initBase() has not been called.
- *
- * @return ITaskContext
*/
protected function getContext(): ITaskContext {
return $this->context;
@@ -290,8 +288,6 @@ abstract class Task {
/**
* Get the restored services. Subclasses that want to call this must declare
* a dependency on "services".
- *
- * @return MediaWikiServices
*/
public function getServices(): MediaWikiServices {
$this->assertDependsOn( 'services' );
@@ -302,8 +298,6 @@ abstract class Task {
* Get a HookContainer suitable for calling LoadExtensionSchemaUpdates.
* Subclasses that want to call this must declare a dependency on
* "HookContainer".
- *
- * @return HookContainer
*/
public function getHookContainer(): HookContainer {
$this->assertDependsOn( 'HookContainer' );
@@ -314,8 +308,6 @@ abstract class Task {
* Get the array of database virtual domains declared in extensions.
* Subclasses that want to call this must declare a dependency on
* "VirtualDomains".
- *
- * @return array
*/
public function getVirtualDomains(): array {
$this->assertDependsOn( 'VirtualDomains' );
diff --git a/includes/installer/Task/TaskList.php b/includes/installer/Task/TaskList.php
index a63f1c8207f1..eb1966ff3517 100644
--- a/includes/installer/Task/TaskList.php
+++ b/includes/installer/Task/TaskList.php
@@ -19,7 +19,6 @@ class TaskList implements \IteratorAggregate {
/**
* Add a task to the list
- * @param Task $task
*/
public function add( Task $task ) {
$this->unsortedTasks[] = $task;
diff --git a/includes/installer/Task/TaskRunner.php b/includes/installer/Task/TaskRunner.php
index 21a8fca4692f..e72ef1543124 100644
--- a/includes/installer/Task/TaskRunner.php
+++ b/includes/installer/Task/TaskRunner.php
@@ -164,8 +164,6 @@ class TaskRunner {
/**
* Add a callback to be called before each task is executed. The callback
* takes one parameter: the task object.
- *
- * @param callable $listener
*/
public function addTaskStartListener( callable $listener ) {
$this->taskStartListeners[] = $listener;
@@ -175,8 +173,6 @@ class TaskRunner {
* Add a callback to be called after each task completes. The callback
* takes two parameters: the task object and the Status returned by the
* task.
- *
- * @param callable $listener
*/
public function addTaskEndListener( callable $listener ) {
$this->taskEndListeners[] = $listener;
@@ -203,8 +199,6 @@ class TaskRunner {
/**
* Provide a summary of the tasks to be executed, for debugging.
- *
- * @return string
*/
public function dumpTaskList(): string {
$ret = '';
diff --git a/includes/installer/WebInstallerOptions.php b/includes/installer/WebInstallerOptions.php
index 49459d8b1b12..ea7a4085a867 100644
--- a/includes/installer/WebInstallerOptions.php
+++ b/includes/installer/WebInstallerOptions.php
@@ -103,7 +103,6 @@ class WebInstallerOptions extends WebInstallerPage {
/**
* Wiki mode - user rights and copyright model.
- * @return void
*/
private function addModeOptions(): void {
$this->addHTML(
@@ -138,7 +137,6 @@ class WebInstallerOptions extends WebInstallerPage {
/**
* User email options.
- * @return void
*/
private function addEmailOptions(): void {
$emailwrapperStyle = $this->getVar( 'wgEnableEmail' ) ? '' : 'display: none';
@@ -183,7 +181,6 @@ class WebInstallerOptions extends WebInstallerPage {
/**
* Opt-in for bundled skins.
- * @return void
*/
private function addSkinOptions(): void {
$skins = $this->parent->findExtensions( 'skins' )->value;
@@ -230,7 +227,6 @@ class WebInstallerOptions extends WebInstallerPage {
/**
* Opt-in for bundled extensions.
- * @return void
*/
private function addExtensionOptions(): void {
global $wgLang;
@@ -325,7 +321,6 @@ class WebInstallerOptions extends WebInstallerPage {
/**
* Image and file upload options.
- * @return void
*/
private function addFileOptions(): void {
// Having / in paths in Windows looks funny :)
@@ -367,7 +362,6 @@ class WebInstallerOptions extends WebInstallerPage {
/**
* System administration related options.
- * @return void
*/
private function addAdvancedOptions(): void {
$caches = [ 'none' ];
diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php
index 95fff17c8436..1c9eac6d906f 100644
--- a/includes/jobqueue/JobQueueDB.php
+++ b/includes/jobqueue/JobQueueDB.php
@@ -62,7 +62,6 @@ class JobQueueDB extends JobQueue {
* If not specified, the primary DB cluster for the wiki will be used.
* This can be overridden with a custom cluster so that DB handles will
* be retrieved via LBFactory::getExternalLB() and getConnection().
- * @param array $params
*/
protected function __construct( array $params ) {
parent::__construct( $params );
diff --git a/includes/jobqueue/jobs/UploadFromUrlJob.php b/includes/jobqueue/jobs/UploadFromUrlJob.php
index 1e936e375a15..648312294302 100644
--- a/includes/jobqueue/jobs/UploadFromUrlJob.php
+++ b/includes/jobqueue/jobs/UploadFromUrlJob.php
@@ -54,11 +54,6 @@ class UploadFromUrlJob extends Job implements GenericParameterJob {
return $info;
}
- /**
- * getter for the upload
- *
- * @return UploadBase
- */
protected function getUpload(): UploadBase {
if ( $this->upload === null ) {
$this->upload = new UploadFromUrl;
diff --git a/includes/jobqueue/jobs/UploadJobTrait.php b/includes/jobqueue/jobs/UploadJobTrait.php
index 4d82380e2f7f..098c64cef3fb 100644
--- a/includes/jobqueue/jobs/UploadJobTrait.php
+++ b/includes/jobqueue/jobs/UploadJobTrait.php
@@ -58,8 +58,6 @@ trait UploadJobTrait {
/**
* Do not allow retries on jobs by default.
- *
- * @return bool
*/
public function allowRetries(): bool {
return false;
@@ -67,8 +65,6 @@ trait UploadJobTrait {
/**
* Run the job
- *
- * @return bool
*/
public function run(): bool {
$this->user = $this->getUserFromSession();
@@ -182,8 +178,6 @@ trait UploadJobTrait {
/**
* Ensure we have the file available. A noop here.
- *
- * @return bool
*/
protected function fetchFile(): bool {
$this->setStatus( 'fetching' );
@@ -202,8 +196,6 @@ trait UploadJobTrait {
/**
* Verify the upload is ok
- *
- * @return bool
*/
private function verifyUpload(): bool {
// Check if the local file checks out (this is generally a no-op)
@@ -249,8 +241,6 @@ trait UploadJobTrait {
/**
* Upload the stashed file to a permanent location
- *
- * @return bool
*/
private function performUpload(): bool {
if ( $this->user === null ) {
diff --git a/includes/language/Language.php b/includes/language/Language.php
index 1e371a51b8a3..c84df7daa423 100644
--- a/includes/language/Language.php
+++ b/includes/language/Language.php
@@ -3362,8 +3362,6 @@ class Language implements Bcp47Code {
* For example, Polish has minimumGroupingDigits = 2, which with a grouping
* size of 3 causes 4-digit numbers to be written like 9999, but 5-digit
* numbers are written like "10 000".
- *
- * @return int
*/
public function minimumGroupingDigits(): int {
return $this->localisationCache->getItem( $this->mCode, 'minimumGroupingDigits' ) ?? 1;
@@ -4143,8 +4141,6 @@ class Language implements Bcp47Code {
*
* NOTE: The return value of this function is NOT HTML-safe and must be escaped with
* htmlspecialchars() or similar
- *
- * @return string
*/
public function getCode(): string {
return $this->mCode;
diff --git a/includes/language/LanguageConverter.php b/includes/language/LanguageConverter.php
index e9ff1a86df5c..f75ce832fe96 100644
--- a/includes/language/LanguageConverter.php
+++ b/includes/language/LanguageConverter.php
@@ -200,8 +200,6 @@ abstract class LanguageConverter implements ILanguageConverter {
/**
* Provides additional flags for converter. By default, it returns empty array and
* typically should be overridden by implementation of converter.
- *
- * @return array
*/
protected function getAdditionalFlags(): array {
return [];
@@ -259,11 +257,6 @@ abstract class LanguageConverter implements ILanguageConverter {
return ';';
}
- /**
- * Get variant names.
- *
- * @return array
- */
public function getVariantNames(): array {
return MediaWikiServices::getInstance()
->getLanguageNameUtils()
@@ -677,8 +670,6 @@ abstract class LanguageConverter implements ILanguageConverter {
/**
* Apply manual conversion rules.
- *
- * @param ConverterRule $convRule
*/
protected function applyManualConv( ConverterRule $convRule ) {
// Use syntax -{T|zh-cn:TitleCN; zh-tw:TitleTw}- to custom
diff --git a/includes/language/LanguageConverterIcu.php b/includes/language/LanguageConverterIcu.php
index eb7b63975d76..a42a96a6a219 100644
--- a/includes/language/LanguageConverterIcu.php
+++ b/includes/language/LanguageConverterIcu.php
@@ -35,8 +35,6 @@ abstract class LanguageConverterIcu extends LanguageConverterSpecific {
/**
* Creates empty tables. mTransliterators will be used instead.
- *
- * @return array
*/
protected function loadDefaultTables(): array {
$tables = [];
diff --git a/includes/language/LanguageNameUtils.php b/includes/language/LanguageNameUtils.php
index 055710918170..917c5cd2c1bc 100644
--- a/includes/language/LanguageNameUtils.php
+++ b/includes/language/LanguageNameUtils.php
@@ -86,10 +86,6 @@ class LanguageNameUtils {
/** @var HookRunner */
private $hookRunner;
- /**
- * @param ServiceOptions $options
- * @param HookContainer $hookContainer
- */
public function __construct( ServiceOptions $options, HookContainer $hookContainer ) {
$options->assertRequiredOptions( self::CONSTRUCTOR_OPTIONS );
$this->options = $options;
diff --git a/includes/language/LocalisationCache.php b/includes/language/LocalisationCache.php
index 7e0052275c99..5b8a93062e9e 100644
--- a/includes/language/LocalisationCache.php
+++ b/includes/language/LocalisationCache.php
@@ -934,10 +934,6 @@ class LocalisationCache {
}
}
- /**
- * @param array &$value
- * @param array $fallbackValue
- */
private function mergeMagicWords( array &$value, array $fallbackValue ): void {
foreach ( $fallbackValue as $magicName => $fallbackInfo ) {
if ( !isset( $value[$magicName] ) ) {
diff --git a/includes/language/RawMessage.php b/includes/language/RawMessage.php
index b2ee93d86f5d..4cd1cc323014 100644
--- a/includes/language/RawMessage.php
+++ b/includes/language/RawMessage.php
@@ -78,7 +78,6 @@ class RawMessage extends Message {
/**
* To conform to the MessageSpecifier interface, always return 'rawmessage',
* which is a real message key that can be used with MessageValue and other classes.
- * @return string
*/
public function getKey(): string {
return 'rawmessage';
diff --git a/includes/language/converters/BanConverter.php b/includes/language/converters/BanConverter.php
index 72b641f2f69e..10392fc4865b 100644
--- a/includes/language/converters/BanConverter.php
+++ b/includes/language/converters/BanConverter.php
@@ -1022,7 +1022,6 @@ EOF;
/**
* Guess if a text is written in Balinese or Latin.
- * Overrides LanguageConverter::guessVariant()
*
* @param string $text The text to be checked
* @param string $variant Language code of the variant to be checked for
diff --git a/includes/libs/DnsSrvDiscoverer.php b/includes/libs/DnsSrvDiscoverer.php
index 20f5ecd2c192..28d71347bdaa 100644
--- a/includes/libs/DnsSrvDiscoverer.php
+++ b/includes/libs/DnsSrvDiscoverer.php
@@ -132,8 +132,6 @@ class DnsSrvDiscoverer {
/**
* Returns the SRV resource record name.
- *
- * @return string
*/
public function getSrvName(): string {
$srv = "_{$this->service}._{$this->protocol}";
diff --git a/includes/libs/Message/DataMessageValue.php b/includes/libs/Message/DataMessageValue.php
index 79d716af8f67..36191eab68b6 100644
--- a/includes/libs/Message/DataMessageValue.php
+++ b/includes/libs/Message/DataMessageValue.php
@@ -66,7 +66,6 @@ class DataMessageValue extends MessageValue {
/**
* Get the message code
- * @return string
*/
public function getCode(): string {
return $this->code;
diff --git a/includes/libs/Message/MessageValue.php b/includes/libs/Message/MessageValue.php
index 79ad579a8a60..a570835d8e0c 100644
--- a/includes/libs/Message/MessageValue.php
+++ b/includes/libs/Message/MessageValue.php
@@ -65,8 +65,6 @@ class MessageValue implements MessageSpecifier, JsonCodecable {
/**
* Get the message key
- *
- * @return string
*/
public function getKey(): string {
return $this->key;
diff --git a/includes/libs/ReplacementArray.php b/includes/libs/ReplacementArray.php
index e16fe324c4d7..7523e7a4cba7 100644
--- a/includes/libs/ReplacementArray.php
+++ b/includes/libs/ReplacementArray.php
@@ -44,7 +44,6 @@ class ReplacementArray {
/**
* Set the whole replacement array at once
- * @param array $data
*/
public function setArray( array $data ) {
$this->data = $data;
diff --git a/includes/libs/Stats/Emitters/UDPEmitter.php b/includes/libs/Stats/Emitters/UDPEmitter.php
index 6fc0334b4905..e266299ba342 100644
--- a/includes/libs/Stats/Emitters/UDPEmitter.php
+++ b/includes/libs/Stats/Emitters/UDPEmitter.php
@@ -38,19 +38,10 @@ use Wikimedia\Stats\StatsUtils;
*/
class UDPEmitter implements EmitterInterface {
- /** @var string */
private string $prefix;
-
- /** @var StatsCache */
private StatsCache $cache;
-
- /** @var FormatterInterface */
private FormatterInterface $formatter;
-
- /** @var UDPTransport|null */
private ?UDPTransport $transport;
-
- /** @var int */
private int $payloadSize;
public function __construct( string $prefix, StatsCache $cache, FormatterInterface $formatter, ?string $target ) {
@@ -92,8 +83,6 @@ class UDPEmitter implements EmitterInterface {
/**
* Renders metrics and samples through the formatter and returns a string[] of wire-formatted metric samples.
- *
- * @return array
*/
private function render(): array {
$output = [];
diff --git a/includes/libs/Stats/Metrics/BaseMetric.php b/includes/libs/Stats/Metrics/BaseMetric.php
index e83cd8d3dd46..74453444da79 100644
--- a/includes/libs/Stats/Metrics/BaseMetric.php
+++ b/includes/libs/Stats/Metrics/BaseMetric.php
@@ -42,13 +42,8 @@ use Wikimedia\Stats\StatsUtils;
*/
class BaseMetric implements BaseMetricInterface {
- /** @var float */
private float $sampleRate = StatsUtils::DEFAULT_SAMPLE_RATE;
-
- /** @var string */
private string $name;
-
- /** @var string */
private string $component;
/** @var array key-value pairs of metric-specific labels */
@@ -60,7 +55,6 @@ class BaseMetric implements BaseMetricInterface {
/** @var Sample[] */
private array $samples = [];
- /** @var IBufferingStatsdDataFactory|null */
private ?IBufferingStatsdDataFactory $statsdDataFactory = null;
/** @var string[] */
diff --git a/includes/libs/Stats/Metrics/BaseMetricInterface.php b/includes/libs/Stats/Metrics/BaseMetricInterface.php
index 611f54d1c1e6..7724ff033592 100644
--- a/includes/libs/Stats/Metrics/BaseMetricInterface.php
+++ b/includes/libs/Stats/Metrics/BaseMetricInterface.php
@@ -55,11 +55,6 @@ interface BaseMetricInterface {
*/
public function getSampleRate(): float;
- /**
- * Sets the sample rate.
- *
- * @param float $sampleRate
- */
public function setSampleRate( float $sampleRate ): void;
/**
diff --git a/includes/libs/Stats/Metrics/CounterMetric.php b/includes/libs/Stats/Metrics/CounterMetric.php
index 6fb8a085d797..70a8052a754d 100644
--- a/includes/libs/Stats/Metrics/CounterMetric.php
+++ b/includes/libs/Stats/Metrics/CounterMetric.php
@@ -44,8 +44,6 @@ class CounterMetric implements MetricInterface {
/**
* Increments metric by one.
- *
- * @return void
*/
public function increment(): void {
$this->incrementBy( 1 );
diff --git a/includes/libs/Stats/Metrics/MetricInterface.php b/includes/libs/Stats/Metrics/MetricInterface.php
index 1f362a60fa9e..0095d887ef67 100644
--- a/includes/libs/Stats/Metrics/MetricInterface.php
+++ b/includes/libs/Stats/Metrics/MetricInterface.php
@@ -29,10 +29,7 @@ use Wikimedia\Stats\Sample;
* @since 1.41
*/
interface MetricInterface {
- /**
- * @param BaseMetricInterface $baseMetric
- * @param LoggerInterface $logger
- */
+
public function __construct( BaseMetricInterface $baseMetric, LoggerInterface $logger );
/** @return string */
diff --git a/includes/libs/Stats/Metrics/MetricTrait.php b/includes/libs/Stats/Metrics/MetricTrait.php
index 6252504230c7..7f32ce769e09 100644
--- a/includes/libs/Stats/Metrics/MetricTrait.php
+++ b/includes/libs/Stats/Metrics/MetricTrait.php
@@ -32,10 +32,8 @@ use Wikimedia\Stats\Exceptions\IllegalOperationException;
* @since 1.43
*/
trait MetricTrait {
- /** @var BaseMetricInterface */
- private BaseMetricInterface $baseMetric;
- /** @var LoggerInterface */
+ private BaseMetricInterface $baseMetric;
private LoggerInterface $logger;
/** @inheritDoc */
diff --git a/includes/libs/Stats/Metrics/TimingMetric.php b/includes/libs/Stats/Metrics/TimingMetric.php
index 3894ab4a49ae..7deaa377d78f 100644
--- a/includes/libs/Stats/Metrics/TimingMetric.php
+++ b/includes/libs/Stats/Metrics/TimingMetric.php
@@ -43,13 +43,10 @@ class TimingMetric implements MetricInterface {
*/
private const TYPE_INDICATOR = "ms";
- /** @var float|null */
private ?float $startTime = null;
/**
* Starts a timer.
- *
- * @return void
*/
public function start(): void {
$this->startTime = hrtime( true );
@@ -57,8 +54,6 @@ class TimingMetric implements MetricInterface {
/**
* Stops a running timer.
- *
- * @return void
*/
public function stop(): void {
if ( $this->startTime === null ) {
diff --git a/includes/libs/Stats/SamplingStatsdClient.php b/includes/libs/Stats/SamplingStatsdClient.php
index d17350b043a7..2ef4e0aeb733 100644
--- a/includes/libs/Stats/SamplingStatsdClient.php
+++ b/includes/libs/Stats/SamplingStatsdClient.php
@@ -158,8 +158,6 @@ class SamplingStatsdClient extends StatsdClient {
/**
* Ideally this would override parent::throwException(), but that is private,
* not protected.
- *
- * @param Exception $exception
*/
private function throwException( Exception $exception ) {
if ( !$this->getFailSilently() ) {
diff --git a/includes/libs/Stats/StatsCache.php b/includes/libs/Stats/StatsCache.php
index fc0f671c1192..abf08d1d7595 100644
--- a/includes/libs/Stats/StatsCache.php
+++ b/includes/libs/Stats/StatsCache.php
@@ -82,8 +82,6 @@ class StatsCache {
/**
* Clears the cache.
- *
- * @return void
*/
public function clear(): void {
$this->cache = [];
diff --git a/includes/libs/Timing.php b/includes/libs/Timing.php
index 2149d33395d1..1083ab9f6dda 100644
--- a/includes/libs/Timing.php
+++ b/includes/libs/Timing.php
@@ -57,8 +57,6 @@ class Timing implements LoggerAwareInterface {
/**
* Sets a logger instance on the object.
- *
- * @param LoggerInterface $logger
*/
public function setLogger( LoggerInterface $logger ) {
$this->logger = $logger;
diff --git a/includes/libs/filebackend/FileBackendMultiWrite.php b/includes/libs/filebackend/FileBackendMultiWrite.php
index cdf5ab4cc0c8..7be37112be27 100644
--- a/includes/libs/filebackend/FileBackendMultiWrite.php
+++ b/includes/libs/filebackend/FileBackendMultiWrite.php
@@ -99,8 +99,6 @@ class FileBackendMultiWrite extends FileBackend {
* - replication : Set to 'async' to defer file operations on the non-master backends.
* This will apply such updates post-send for web requests. Note that
* any checks from "syncChecks" are still synchronous.
- *
- * @param array $config
*/
public function __construct( array $config ) {
parent::__construct( $config );
diff --git a/includes/libs/filebackend/FileBackendStore.php b/includes/libs/filebackend/FileBackendStore.php
index 1cfa6183bb9b..bd08d73deb44 100644
--- a/includes/libs/filebackend/FileBackendStore.php
+++ b/includes/libs/filebackend/FileBackendStore.php
@@ -1849,8 +1849,6 @@ abstract class FileBackendStore extends FileBackend {
* Do a batch lookup from cache for container stats for all containers
* used in a list of container names or storage paths objects.
* This loads the persistent cache values into the process cache.
- *
- * @param array $items
*/
final protected function primeContainerCache( array $items ) {
/** @noinspection PhpUnusedLocalVariableInspection */
diff --git a/includes/libs/http/MultiHttpClient.php b/includes/libs/http/MultiHttpClient.php
index 918aa27f9fa0..8c89c7423883 100644
--- a/includes/libs/http/MultiHttpClient.php
+++ b/includes/libs/http/MultiHttpClient.php
@@ -87,7 +87,6 @@ class MultiHttpClient implements LoggerAwareInterface {
protected $userAgent = 'wikimedia/multi-http-client v1.1';
/** @var LoggerInterface */
protected $logger;
- /** @var array */
protected array $headers = [];
// In PHP 7 due to https://bugs.php.net/bug.php?id=76480 the request/connect
@@ -846,8 +845,6 @@ class MultiHttpClient implements LoggerAwareInterface {
/**
* Register a logger
- *
- * @param LoggerInterface $logger
*/
public function setLogger( LoggerInterface $logger ) {
$this->logger = $logger;
diff --git a/includes/libs/mime/MimeAnalyzer.php b/includes/libs/mime/MimeAnalyzer.php
index ddf0bcc226d2..9ec0751cda72 100644
--- a/includes/libs/mime/MimeAnalyzer.php
+++ b/includes/libs/mime/MimeAnalyzer.php
@@ -250,8 +250,6 @@ class MimeAnalyzer implements LoggerAwareInterface {
*
* As an extension author, you are encouraged to submit patches to
* MediaWiki's core to add new MIME types to MimeMap.php.
- *
- * @param string $types
*/
public function addExtraTypes( string $types ): void {
$this->extraTypes .= "\n" . $types;
@@ -262,8 +260,6 @@ class MimeAnalyzer implements LoggerAwareInterface {
*
* As an extension author, you are encouraged to submit patches to
* MediaWiki's core to add new MIME info to MimeMap.php.
- *
- * @param string $info
*/
public function addExtraInfo( string $info ): void {
$this->extraInfo .= "\n" . $info;
diff --git a/includes/libs/rdbms/ConfiguredReadOnlyMode.php b/includes/libs/rdbms/ConfiguredReadOnlyMode.php
index a3648e8ce62b..66134e4c4381 100644
--- a/includes/libs/rdbms/ConfiguredReadOnlyMode.php
+++ b/includes/libs/rdbms/ConfiguredReadOnlyMode.php
@@ -34,8 +34,6 @@ class ConfiguredReadOnlyMode {
/**
* Check whether the site is in read-only mode.
- *
- * @return bool
*/
public function isReadOnly(): bool {
return $this->getReason() !== false;
diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php
index effe306700b8..e71f2618f2a0 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -300,8 +300,6 @@ abstract class Database implements Stringable, IDatabaseForOwner, IMaintainableD
/**
* Set the PSR-3 logger interface to use.
- *
- * @param LoggerInterface $logger
*/
public function setLogger( LoggerInterface $logger ) {
$this->logger = $logger;
@@ -604,8 +602,6 @@ abstract class Database implements Stringable, IDatabaseForOwner, IMaintainableD
/**
* Register creation and dropping of temporary tables
- *
- * @param Query $query
*/
protected function registerTempTables( Query $query ) {
$table = $query->getWriteTable();
@@ -1260,8 +1256,6 @@ abstract class Database implements Stringable, IDatabaseForOwner, IMaintainableD
/**
* Get a SelectQueryBuilder bound to this connection. This is overridden by
* DBConnRef.
- *
- * @return SelectQueryBuilder
*/
public function newSelectQueryBuilder(): SelectQueryBuilder {
return new SelectQueryBuilder( $this );
@@ -1270,8 +1264,6 @@ abstract class Database implements Stringable, IDatabaseForOwner, IMaintainableD
/**
* Get a UnionQueryBuilder bound to this connection. This is overridden by
* DBConnRef.
- *
- * @return UnionQueryBuilder
*/
public function newUnionQueryBuilder(): UnionQueryBuilder {
return new UnionQueryBuilder( $this );
@@ -1280,8 +1272,6 @@ abstract class Database implements Stringable, IDatabaseForOwner, IMaintainableD
/**
* Get an UpdateQueryBuilder bound to this connection. This is overridden by
* DBConnRef.
- *
- * @return UpdateQueryBuilder
*/
public function newUpdateQueryBuilder(): UpdateQueryBuilder {
return new UpdateQueryBuilder( $this );
@@ -1290,8 +1280,6 @@ abstract class Database implements Stringable, IDatabaseForOwner, IMaintainableD
/**
* Get a DeleteQueryBuilder bound to this connection. This is overridden by
* DBConnRef.
- *
- * @return DeleteQueryBuilder
*/
public function newDeleteQueryBuilder(): DeleteQueryBuilder {
return new DeleteQueryBuilder( $this );
@@ -1300,8 +1288,6 @@ abstract class Database implements Stringable, IDatabaseForOwner, IMaintainableD
/**
* Get a InsertQueryBuilder bound to this connection. This is overridden by
* DBConnRef.
- *
- * @return InsertQueryBuilder
*/
public function newInsertQueryBuilder(): InsertQueryBuilder {
return new InsertQueryBuilder( $this );
@@ -1310,8 +1296,6 @@ abstract class Database implements Stringable, IDatabaseForOwner, IMaintainableD
/**
* Get a ReplaceQueryBuilder bound to this connection. This is overridden by
* DBConnRef.
- *
- * @return ReplaceQueryBuilder
*/
public function newReplaceQueryBuilder(): ReplaceQueryBuilder {
return new ReplaceQueryBuilder( $this );
diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php b/includes/libs/rdbms/database/DatabaseSqlite.php
index 4320c731e371..f4ec8e75a4fb 100644
--- a/includes/libs/rdbms/database/DatabaseSqlite.php
+++ b/includes/libs/rdbms/database/DatabaseSqlite.php
@@ -80,7 +80,6 @@ class DatabaseSqlite extends Database {
* - dbDirectory : directory containing the DB and the lock file directory
* - dbFilePath : use this to force the path of the DB file
* - trxMode : one of (deferred, immediate, exclusive)
- * @param array $params
*/
public function __construct( array $params ) {
if ( isset( $params['dbFilePath'] ) ) {
diff --git a/includes/libs/rdbms/database/TransactionManager.php b/includes/libs/rdbms/database/TransactionManager.php
index fe0beedc5241..13c9ea9a4312 100644
--- a/includes/libs/rdbms/database/TransactionManager.php
+++ b/includes/libs/rdbms/database/TransactionManager.php
@@ -202,8 +202,6 @@ class TransactionManager {
/**
* Mark the transaction as requiring rollback (STATUS_TRX_ERROR) due to an error
- *
- * @param Throwable $trxError
*/
public function setTransactionError( Throwable $trxError ) {
if ( $this->trxStatus !== self::STATUS_TRX_ERROR ) {
@@ -212,9 +210,6 @@ class TransactionManager {
}
}
- /**
- * @param array|null $trxStatusIgnoredCause
- */
public function setTrxStatusIgnoredCause( ?array $trxStatusIgnoredCause ): void {
$this->trxStatusIgnoredCause = $trxStatusIgnoredCause;
}
@@ -231,8 +226,6 @@ class TransactionManager {
/**
* Flag the session as needing a reset due to an error, if not already flagged
- *
- * @param Throwable $sessionError
*/
public function setSessionError( Throwable $sessionError ) {
$this->sessionError ??= $sessionError;
diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php
index 8ebb0a4fafd9..01391a96d512 100644
--- a/includes/libs/rdbms/lbfactory/LBFactory.php
+++ b/includes/libs/rdbms/lbfactory/LBFactory.php
@@ -123,10 +123,6 @@ abstract class LBFactory implements ILBFactory {
}
}
- /**
- * @param array $conf
- * @return void
- */
protected function configure( array $conf ): void {
$this->localDomain = isset( $conf['localDomain'] )
? DatabaseDomain::newFromId( $conf['localDomain'] )
diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index 5b95de9b7161..66e3a1ac30b8 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -1302,8 +1302,6 @@ class LoadBalancer implements ILoadBalancerForOwner {
*
* Using this function makes sure the LoadBalancer knows the connection is closed.
* If you use $conn->close() directly, the load balancer won't update its state.
- *
- * @param IDatabaseForOwner $conn
*/
private function closeConnection( IDatabaseForOwner $conn ) {
if ( $conn instanceof DBConnRef ) {
diff --git a/includes/libs/rdbms/querybuilder/DeleteQueryBuilder.php b/includes/libs/rdbms/querybuilder/DeleteQueryBuilder.php
index 2dcfdb1cfeb8..570ba6d1c9e5 100644
--- a/includes/libs/rdbms/querybuilder/DeleteQueryBuilder.php
+++ b/includes/libs/rdbms/querybuilder/DeleteQueryBuilder.php
@@ -38,8 +38,6 @@ class DeleteQueryBuilder {
/**
* Only for use in subclasses and Database::newDeleteQueryBuilder.
* To create a DeleteQueryBuilder instance, use `$db->newDeleteQueryBuilder()` instead.
- *
- * @param IDatabase $db
*/
public function __construct( IDatabase $db ) {
$this->db = $db;
diff --git a/includes/libs/rdbms/querybuilder/InsertQueryBuilder.php b/includes/libs/rdbms/querybuilder/InsertQueryBuilder.php
index 70de83463dab..2dd01e1c9c85 100644
--- a/includes/libs/rdbms/querybuilder/InsertQueryBuilder.php
+++ b/includes/libs/rdbms/querybuilder/InsertQueryBuilder.php
@@ -60,8 +60,6 @@ class InsertQueryBuilder {
/**
* Only for use in subclasses. To create a InsertQueryBuilder instance,
* use `$db->newInsertQueryBuilder()` instead.
- *
- * @param IDatabase $db
*/
public function __construct( IDatabase $db ) {
$this->db = $db;
diff --git a/includes/libs/rdbms/querybuilder/ReplaceQueryBuilder.php b/includes/libs/rdbms/querybuilder/ReplaceQueryBuilder.php
index 154d56de4076..94fc2117b115 100644
--- a/includes/libs/rdbms/querybuilder/ReplaceQueryBuilder.php
+++ b/includes/libs/rdbms/querybuilder/ReplaceQueryBuilder.php
@@ -45,8 +45,6 @@ class ReplaceQueryBuilder {
/**
* Only for use in subclasses. To create a ReplaceQueryBuilder instance,
* use `$db->newReplaceQueryBuilder()` instead.
- *
- * @param IDatabase $db
*/
public function __construct( IDatabase $db ) {
$this->db = $db;
diff --git a/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php b/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php
index 0a5489d2ee64..79b91e73e13d 100644
--- a/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php
+++ b/includes/libs/rdbms/querybuilder/SelectQueryBuilder.php
@@ -66,14 +66,11 @@ class SelectQueryBuilder extends JoinGroupBase {
*/
private $isCallerOverridden = false;
- /** @var IReadableDatabase */
protected IReadableDatabase $db;
/**
* Only for use in subclasses. To create a SelectQueryBuilder instance,
* use `$db->newSelectQueryBuilder()` instead.
- *
- * @param IReadableDatabase $db
*/
public function __construct( IReadableDatabase $db ) {
$this->db = $db;
@@ -822,8 +819,6 @@ class SelectQueryBuilder extends JoinGroupBase {
* COUNT() expression, for example:
*
* $queryBuilder->select( 'COUNT(*)' )->from( 'page' )->fetchField()
- *
- * @return int
*/
public function fetchRowCount(): int {
return $this->db->selectRowCount( $this->tables, $this->getRowCountVar(), $this->conds,
@@ -837,8 +832,6 @@ class SelectQueryBuilder extends JoinGroupBase {
* by a SELECT query, using EXPLAIN SELECT. The estimate is provided using
* index cardinality statistics, and is notoriously inaccurate, especially
* when large numbers of rows have recently been added or deleted.
- *
- * @return int
*/
public function estimateRowCount(): int {
return $this->db->estimateRowCount( $this->tables, $this->getRowCountVar(), $this->conds,
diff --git a/includes/libs/rdbms/querybuilder/UnionQueryBuilder.php b/includes/libs/rdbms/querybuilder/UnionQueryBuilder.php
index e2dc5e64c49c..ef4a85507d0c 100644
--- a/includes/libs/rdbms/querybuilder/UnionQueryBuilder.php
+++ b/includes/libs/rdbms/querybuilder/UnionQueryBuilder.php
@@ -41,8 +41,6 @@ class UnionQueryBuilder {
/**
* To create a UnionQueryBuilder instance, use `$db->newUnionQueryBuilder()` instead.
- *
- * @param IDatabase $db
*/
public function __construct( IDatabase $db ) {
$this->db = $db;
diff --git a/includes/libs/rdbms/querybuilder/UpdateQueryBuilder.php b/includes/libs/rdbms/querybuilder/UpdateQueryBuilder.php
index c2bfac184bc4..bb0d96e36e46 100644
--- a/includes/libs/rdbms/querybuilder/UpdateQueryBuilder.php
+++ b/includes/libs/rdbms/querybuilder/UpdateQueryBuilder.php
@@ -50,8 +50,6 @@ class UpdateQueryBuilder {
/**
* Only for use in subclasses. To create a UpdateQueryBuilder instance,
* use `$db->newUpdateQueryBuilder()` instead.
- *
- * @param IDatabase $db
*/
public function __construct( IDatabase $db ) {
$this->db = $db;
diff --git a/includes/libs/telemetry/Clock.php b/includes/libs/telemetry/Clock.php
index 65675c6d601c..f57d62146de8 100644
--- a/includes/libs/telemetry/Clock.php
+++ b/includes/libs/telemetry/Clock.php
@@ -32,7 +32,6 @@ class Clock {
/**
* Get the current time, represented as the number of nanoseconds since the UNIX epoch.
- * @return int
*/
public function getCurrentNanoTime(): int {
$this->referenceTime ??= (int)( 1e9 * microtime( true ) ) - hrtime( true );
diff --git a/includes/libs/telemetry/TracerState.php b/includes/libs/telemetry/TracerState.php
index 0160a66a8ee2..b4f4381ae1ca 100644
--- a/includes/libs/telemetry/TracerState.php
+++ b/includes/libs/telemetry/TracerState.php
@@ -40,7 +40,6 @@ class TracerState {
/**
* Get or initialize the shared tracer state for the current process or web request.
- * @return TracerState
*/
public static function getInstance(): TracerState {
self::$instance ??= new self();
@@ -49,7 +48,6 @@ class TracerState {
/**
* Reset shared tracer state. Useful for testing.
- * @return void
*/
public static function destroyInstance(): void {
Assert::precondition(
diff --git a/includes/linker/LinkRenderer.php b/includes/linker/LinkRenderer.php
index 2be522cfabfc..4a54e59d9070 100644
--- a/includes/linker/LinkRenderer.php
+++ b/includes/linker/LinkRenderer.php
@@ -152,8 +152,6 @@ class LinkRenderer {
/**
* True when the links will be rendered in an edit summary or log comment.
- *
- * @return bool
*/
public function isForComment(): bool {
// This option only exists to power a hack in Wikibase's onHtmlPageLinkRendererEnd hook.
diff --git a/includes/linker/LinksMigration.php b/includes/linker/LinksMigration.php
index 6d6ea16b438b..22508a2ff4f3 100644
--- a/includes/linker/LinksMigration.php
+++ b/includes/linker/LinksMigration.php
@@ -68,10 +68,6 @@ class LinksMigration {
'pl' => 'pagelinks',
];
- /**
- * @param Config $config
- * @param LinkTargetLookup $linktargetLookup
- */
public function __construct( Config $config, LinkTargetLookup $linktargetLookup ) {
$this->config = $config;
$this->linkTargetLookup = $linktargetLookup;
diff --git a/includes/logging/LogFormatter.php b/includes/logging/LogFormatter.php
index f5461c40fc98..b0c26314bf28 100644
--- a/includes/logging/LogFormatter.php
+++ b/includes/logging/LogFormatter.php
@@ -143,7 +143,6 @@ class LogFormatter {
/**
* Replace the default context
- * @param IContextSource $context
*/
public function setContext( IContextSource $context ) {
$this->context = $context;
diff --git a/includes/logging/LogFormatterFactory.php b/includes/logging/LogFormatterFactory.php
index bbcd6868a147..ce9a23d624ef 100644
--- a/includes/logging/LogFormatterFactory.php
+++ b/includes/logging/LogFormatterFactory.php
@@ -42,10 +42,6 @@ class LogFormatterFactory {
$this->userEditTracker = $userEditTracker;
}
- /**
- * @param LogEntry $entry
- * @return LogFormatter
- */
public function newFromEntry( LogEntry $entry ): LogFormatter {
$logActionsHandlers = $this->serviceOptions->get( MainConfigNames::LogActionsHandlers );
$fulltype = $entry->getFullType();
diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php
index 7d72492fe2ec..6cfa1361d990 100644
--- a/includes/mail/EmailNotification.php
+++ b/includes/mail/EmailNotification.php
@@ -360,7 +360,6 @@ class EmailNotification {
/**
* Generate the generic "this page has been changed" e-mail text.
- * @param MessageCache $messageCache
*/
private function composeCommonMailtext( MessageCache $messageCache ) {
$services = MediaWikiServices::getInstance();
diff --git a/includes/mail/EmailUserFactory.php b/includes/mail/EmailUserFactory.php
index 903cbaa4dfe3..8fe82280dce3 100644
--- a/includes/mail/EmailUserFactory.php
+++ b/includes/mail/EmailUserFactory.php
@@ -81,10 +81,6 @@ class EmailUserFactory {
$this->contLangMsgFormatter = $contLangMsgFormatter;
}
- /**
- * @param Authority $sender
- * @return EmailUser
- */
public function newEmailUser( Authority $sender ): EmailUser {
return new EmailUser(
$this->options,
diff --git a/includes/media/MediaHandlerFactory.php b/includes/media/MediaHandlerFactory.php
index 7c1318610a9e..b818705d881c 100644
--- a/includes/media/MediaHandlerFactory.php
+++ b/includes/media/MediaHandlerFactory.php
@@ -64,10 +64,6 @@ class MediaHandlerFactory {
*/
private $handlers;
- /**
- * @param LoggerInterface $logger
- * @param array $registry
- */
public function __construct(
LoggerInterface $logger,
array $registry
diff --git a/includes/objectcache/ObjectCacheFactory.php b/includes/objectcache/ObjectCacheFactory.php
index 7cf588ee1598..92389c54651f 100644
--- a/includes/objectcache/ObjectCacheFactory.php
+++ b/includes/objectcache/ObjectCacheFactory.php
@@ -123,8 +123,6 @@ class ObjectCacheFactory {
* This is either the value of the MainConfigNames::CachePrefix setting
* or (if the former is unset) the MainConfigNames::DBname setting, with
* MainConfigNames::DBprefix (if defined).
- *
- * @return string
*/
private function getDefaultKeyspace(): string {
$cachePrefix = $this->options->get( MainConfigNames::CachePrefix );
diff --git a/includes/page/Article.php b/includes/page/Article.php
index d384c27c6abb..234d3620971f 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -233,7 +233,6 @@ class Article implements Page {
/**
* Tell the page view functions that this view was redirected
* from another page on the wiki.
- * @param Title $from
*/
public function setRedirectedFrom( Title $from ) {
$this->mRedirectedFrom = $from;
@@ -878,10 +877,6 @@ class Article implements Page {
return true;
}
- /**
- * @param ?ParserOutput $pOutput
- * @param OutputPage $outputPage
- */
private function doOutputMetaData( ?ParserOutput $pOutput, OutputPage $outputPage ) {
# Adjust title for main page & pages with displaytitle
if ( $pOutput ) {
@@ -991,7 +986,6 @@ class Article implements Page {
/**
* Adjust title for pages with displaytitle, -{T|}- or language conversion
- * @param ParserOutput $pOutput
*/
public function adjustDisplayTitle( ParserOutput $pOutput ) {
$out = $this->getContext()->getOutput();
diff --git a/includes/page/DeletePage.php b/includes/page/DeletePage.php
index d1a14725514b..6dbeed410ad1 100644
--- a/includes/page/DeletePage.php
+++ b/includes/page/DeletePage.php
@@ -220,8 +220,6 @@ class DeletePage {
/**
* Tests whether it's probably possible to delete the associated talk page. This checks the replica,
* so it may not see the latest master change, and is useful e.g. for building the UI.
- *
- * @return StatusValue
*/
public function canProbablyDeleteAssociatedTalk(): StatusValue {
if ( $this->namespaceInfo->isTalk( $this->page->getNamespace() ) ) {
diff --git a/includes/page/MergeHistory.php b/includes/page/MergeHistory.php
index fa0666ca44d2..f6fbde8dd9dd 100644
--- a/includes/page/MergeHistory.php
+++ b/includes/page/MergeHistory.php
@@ -529,8 +529,6 @@ class MergeHistory {
/**
* Get the maximum timestamp that we can use (oldest timestamp of dest)
- *
- * @return MWTimestamp
*/
private function getMaxTimestamp(): MWTimestamp {
if ( $this->maxTimestamp === false ) {
@@ -542,8 +540,6 @@ class MergeHistory {
/**
* Get the timestamp upto which history from the source will be merged,
* or null if something went wrong
- *
- * @return ?MWTimestamp
*/
private function getTimestampLimit(): ?MWTimestamp {
if ( $this->timestampLimit === false ) {
@@ -555,8 +551,6 @@ class MergeHistory {
/**
* Get the SQL WHERE condition that selects source revisions to insert into destination,
* or null if something went wrong
- *
- * @return ?string
*/
private function getTimeWhere(): ?string {
if ( $this->timeWhere === false ) {
diff --git a/includes/page/PageIdentityValue.php b/includes/page/PageIdentityValue.php
index 42c806a7f331..6d9b7b229dda 100644
--- a/includes/page/PageIdentityValue.php
+++ b/includes/page/PageIdentityValue.php
@@ -119,7 +119,6 @@ class PageIdentityValue extends PageReferenceValue implements ProperPageIdentity
/**
* Returns whether the page currently exists.
* Returns true if getId() returns a value greater than zero.
- * @return bool
*/
public function exists(): bool {
return $this->getId( $this->getWikiId() ) > 0;
diff --git a/includes/page/PageProps.php b/includes/page/PageProps.php
index e395c26a081b..a74e5999ae59 100644
--- a/includes/page/PageProps.php
+++ b/includes/page/PageProps.php
@@ -42,10 +42,6 @@ class PageProps {
private IConnectionProvider $dbProvider;
private MapCacheLRU $cache;
- /**
- * @param LinkBatchFactory $linkBatchFactory
- * @param IConnectionProvider $dbProvider
- */
public function __construct(
LinkBatchFactory $linkBatchFactory,
IConnectionProvider $dbProvider
diff --git a/includes/page/PageReferenceValue.php b/includes/page/PageReferenceValue.php
index fb3ec4d4dd30..6f444a633e75 100644
--- a/includes/page/PageReferenceValue.php
+++ b/includes/page/PageReferenceValue.php
@@ -126,8 +126,6 @@ class PageReferenceValue implements Stringable, PageReference {
/**
* Returns a string representation of the title, for logging. This is purely informative
* and must not be used programmatically.
- *
- * @return string
*/
public function __toString(): string {
$s = '[' . $this->namespace . ':' . $this->dbKey . ']';
diff --git a/includes/page/PageStoreRecord.php b/includes/page/PageStoreRecord.php
index 1d1bcda83855..b5a7556466f4 100644
--- a/includes/page/PageStoreRecord.php
+++ b/includes/page/PageStoreRecord.php
@@ -79,8 +79,6 @@ class PageStoreRecord extends PageIdentityValue implements ExistingPageRecord {
/**
* False if the page has had more than one edit.
- *
- * @return bool
*/
public function isNew(): bool {
return (bool)$this->row->page_is_new;
@@ -88,8 +86,6 @@ class PageStoreRecord extends PageIdentityValue implements ExistingPageRecord {
/**
* True if the page is a redirect.
- *
- * @return bool
*/
public function isRedirect(): bool {
return (bool)$this->row->page_is_redirect;
@@ -109,8 +105,6 @@ class PageStoreRecord extends PageIdentityValue implements ExistingPageRecord {
/**
* Timestamp at which the page was last rerendered.
- *
- * @return string
*/
public function getTouched(): string {
return MWTimestamp::convert( TS_MW, $this->row->page_touched );
@@ -118,8 +112,6 @@ class PageStoreRecord extends PageIdentityValue implements ExistingPageRecord {
/**
* Language in which the page is written.
- *
- * @return ?string
*/
public function getLanguage(): ?string {
return $this->getField( 'page_lang' );
diff --git a/includes/page/RollbackPage.php b/includes/page/RollbackPage.php
index 2cc18b563aae..9c5c125b2797 100644
--- a/includes/page/RollbackPage.php
+++ b/includes/page/RollbackPage.php
@@ -162,11 +162,6 @@ class RollbackPage {
return $this;
}
- /**
- * Authorize the rollback.
- *
- * @return PermissionStatus
- */
public function authorizeRollback(): PermissionStatus {
$permissionStatus = PermissionStatus::newEmpty();
$this->performer->authorizeWrite( 'edit', $this->page, $permissionStatus );
diff --git a/includes/page/UndeletePage.php b/includes/page/UndeletePage.php
index e165d4aac086..2585a6a22cd9 100644
--- a/includes/page/UndeletePage.php
+++ b/includes/page/UndeletePage.php
@@ -178,8 +178,6 @@ class UndeletePage {
/**
* Tests whether it's probably possible to undelete the associated talk page. This checks the replica,
* so it may not see the latest master change, and is useful e.g. for building the UI.
- *
- * @return StatusValue
*/
public function canProbablyUndeleteAssociatedTalk(): StatusValue {
if ( $this->namespaceInfo->isTalk( $this->page->getNamespace() ) ) {
@@ -377,10 +375,6 @@ class UndeletePage {
return $resStatus;
}
- /**
- * @param string $comment
- * @return StatusValue
- */
private function runPreUndeleteHook( string $comment ): StatusValue {
$checkPages = [ $this->page ];
if ( $this->associatedTalk ) {
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index dd41a7585360..f9eebd8ea506 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -729,7 +729,6 @@ class WikiPage implements Stringable, Page, PageRecord {
/**
* Set the latest revision
- * @param RevisionRecord $revRecord
*/
private function setLastEdit( RevisionRecord $revRecord ) {
$this->mLastRevision = $revRecord;
@@ -2483,8 +2482,6 @@ class WikiPage implements Stringable, Page, PageRecord {
/**
* Clears caches when article is deleted
- *
- * @param Title $title
*/
public static function onArticleDelete( Title $title ) {
// TODO: move this into a PageEventEmitter service
@@ -2619,8 +2616,6 @@ class WikiPage implements Stringable, Page, PageRecord {
/**
* Purge the check key for cross-wiki cache entries referencing this page
- *
- * @param Title $title
*/
private static function purgeInterwikiCheckKey( Title $title ) {
$enableScaryTranscluding = MediaWikiServices::getInstance()->getMainConfig()->get(
diff --git a/includes/pager/ReverseChronologicalPager.php b/includes/pager/ReverseChronologicalPager.php
index 5201cd9d874d..a10edb6119e0 100644
--- a/includes/pager/ReverseChronologicalPager.php
+++ b/includes/pager/ReverseChronologicalPager.php
@@ -47,10 +47,6 @@ abstract class ReverseChronologicalPager extends IndexPager {
/** @var string */
protected $endOffset;
- /**
- * @param string $date
- * @return string
- */
protected function getHeaderRow( string $date ): string {
$headingClass = $this->isFirstHeaderRow() ?
// We use mw-index-pager- prefix here on the anticipation that this method will
diff --git a/includes/parser/CacheTime.php b/includes/parser/CacheTime.php
index e4a00f92e71b..cf7c7ac60938 100644
--- a/includes/parser/CacheTime.php
+++ b/includes/parser/CacheTime.php
@@ -148,7 +148,6 @@ class CacheTime implements ParserCacheMetadata, JsonDeserializable {
* The value returned by getCacheExpiry is smaller or equal to the smallest number
* that was provided to a call of updateCacheExpiry(), and smaller or equal to the
* value of $wgParserCacheExpireTime.
- * @return int
*/
public function getCacheExpiry(): int {
$parserCacheExpireTime = MediaWikiServices::getInstance()->getMainConfig()
diff --git a/includes/parser/MagicWordFactory.php b/includes/parser/MagicWordFactory.php
index 733b35a2d753..5c8419db0204 100644
--- a/includes/parser/MagicWordFactory.php
+++ b/includes/parser/MagicWordFactory.php
@@ -226,8 +226,6 @@ class MagicWordFactory {
/**
* Get a MagicWordArray of double-underscore entities
- *
- * @return MagicWordArray
*/
public function getDoubleUnderscoreArray(): MagicWordArray {
if ( $this->mDoubleUnderscoreArray === null ) {
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index d7562dd5e412..0f0158612dfb 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1660,8 +1660,6 @@ class Parser {
/**
* Shorthand for getting a Language Converter for Content language
- *
- * @return ILanguageConverter
*/
private function getContentLanguageConverter(): ILanguageConverter {
return $this->languageConverterFactory->getLanguageConverter(
@@ -3956,10 +3954,6 @@ class Parser {
return $ret;
}
- /**
- * @param string $lowerTagName
- * @return bool
- */
public function tagNeedsNowikiStrippedInTagPF( string $lowerTagName ): bool {
$parsoidSiteConfig = MediaWikiServices::getInstance()->getParsoidSiteConfig();
return $parsoidSiteConfig->tagNeedsNowikiStrippedInTagPF( $lowerTagName );
diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php
index 923f0500045f..181dd9eb2a9c 100644
--- a/includes/parser/ParserCache.php
+++ b/includes/parser/ParserCache.php
@@ -317,10 +317,6 @@ class ParserCache {
return $metadata;
}
- /**
- * @param PageRecord $page
- * @return string
- */
private function makeMetadataKey( PageRecord $page ): string {
return $this->cache->makeKey( $this->name, $page->getId( PageRecord::LOCAL ), '|#|', 'idoptions' );
}
diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php
index b720a7529c13..07dd8a75ac37 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -1606,7 +1606,6 @@ class ParserOptions {
/**
* Returns reason for rendering the content. This human-readable, intended for logging and debugging only.
* Expected values include "edit", "view", "purge", "LinksUpdate", etc.
- * @return string
*/
public function getRenderReason(): string {
return $this->renderReason;
@@ -1615,7 +1614,6 @@ class ParserOptions {
/**
* Sets reason for rendering the content. This human-readable, intended for logging and debugging only.
* Expected values include "edit", "view", "purge", "LinksUpdate", etc.
- * @param string $renderReason
*/
public function setRenderReason( string $renderReason ): void {
$this->renderReason = $renderReason;
diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php
index 324bc1272052..2abcfbde6c6b 100644
--- a/includes/parser/ParserOutput.php
+++ b/includes/parser/ParserOutput.php
@@ -582,8 +582,6 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector {
* Returns the class (or classes) to be used with the wrapper div for this output.
* If there is no wrapper class given, no wrapper div should be added.
* The wrapper div is added automatically by getText().
- *
- * @return string
*/
public function getWrapperDivClass(): string {
return implode( ' ', array_keys( $this->mWrapperDivClasses ) );
@@ -2475,7 +2473,6 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector {
/**
* Transfer parser options which affect post-processing from ParserOptions
* to this ParserOutput.
- * @param ParserOptions $parserOptions
*/
public function setFromParserOptions( ParserOptions $parserOptions ) {
// Copied from Parser.php::parse and should probably be abstracted
@@ -2522,8 +2519,6 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector {
* Merges internal metadata such as flags, accessed options, and profiling info
* from $source into this ParserOutput. This should be used whenever the state of $source
* has any impact on the state of this ParserOutput.
- *
- * @param ParserOutput $source
*/
public function mergeInternalMetaDataFrom( ParserOutput $source ): void {
$this->mWarnings = self::mergeMap( $this->mWarnings, $source->mWarnings ); // don't use getter
@@ -2596,8 +2591,6 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector {
* Merges HTML metadata such as head items, JS config vars, and HTTP cache control info
* from $source into this ParserOutput. This should be used whenever the HTML in $source
* has been somehow merged into the HTML of this ParserOutput.
- *
- * @param ParserOutput $source
*/
public function mergeHtmlMetaDataFrom( ParserOutput $source ): void {
// HTML and HTTP
@@ -2674,8 +2667,6 @@ class ParserOutput extends CacheTime implements ContentMetadataCollector {
* Merges dependency tracking metadata such as backlinks, images used, and extension data
* from $source into this ParserOutput. This allows dependency tracking to be done for the
* combined output of multiple content slots.
- *
- * @param ParserOutput $source
*/
public function mergeTrackingMetaDataFrom( ParserOutput $source ): void {
foreach (
diff --git a/includes/parser/Parsoid/Config/PageConfig.php b/includes/parser/Parsoid/Config/PageConfig.php
index c57227813b18..7866475a8f51 100644
--- a/includes/parser/Parsoid/Config/PageConfig.php
+++ b/includes/parser/Parsoid/Config/PageConfig.php
@@ -68,10 +68,6 @@ class PageConfig extends IPageConfig {
$this->pageLanguageDir = $pageLanguageDir;
}
- /**
- * Get content model
- * @return string
- */
public function getContentModel(): string {
// @todo Check just the main slot, or all slots, or what?
$rev = $this->getRevision();
diff --git a/includes/parser/Parsoid/Config/SiteConfig.php b/includes/parser/Parsoid/Config/SiteConfig.php
index 6fb3fb5cbbbc..b54c39075093 100644
--- a/includes/parser/Parsoid/Config/SiteConfig.php
+++ b/includes/parser/Parsoid/Config/SiteConfig.php
@@ -254,7 +254,6 @@ class SiteConfig extends ISiteConfig {
/**
* Create a prefixed StatsFactory for parsoid stats
- * @return StatsFactory
*/
public function prefixedStatsFactory(): StatsFactory {
$component = $this->getStatsPrefix( true );
@@ -558,10 +557,6 @@ class SiteConfig extends ISiteConfig {
return $this->contLang->isRTL();
}
- /**
- * @param Bcp47Code $lang
- * @return bool
- */
public function langConverterEnabledBcp47( Bcp47Code $lang ): bool {
if ( $this->languageConverterFactory->isConversionDisabled() ) {
return false;
@@ -759,7 +754,6 @@ class SiteConfig extends ISiteConfig {
/**
* Overrides the max template depth in the MediaWiki configuration.
- * @param int $depth
*/
public function setMaxTemplateDepth( int $depth ): void {
// Parsoid's command-line tools let you set the max template depth
diff --git a/includes/parser/Parsoid/HtmlToContentTransform.php b/includes/parser/Parsoid/HtmlToContentTransform.php
index 1ab61ee213da..09bf9c36a615 100644
--- a/includes/parser/Parsoid/HtmlToContentTransform.php
+++ b/includes/parser/Parsoid/HtmlToContentTransform.php
@@ -139,8 +139,6 @@ class HtmlToContentTransform {
/**
* Sets the original source text (usually wikitext).
- *
- * @param string $text
*/
public function setOriginalText( string $text ): void {
$content = $this->getContentHandler()->unserializeContent( $text );
@@ -149,8 +147,6 @@ class HtmlToContentTransform {
/**
* Sets the original content (such as wikitext).
- *
- * @param Content $content
*/
public function setOriginalContent( Content $content ): void {
if ( $this->pageConfig ) {
@@ -270,8 +266,6 @@ class HtmlToContentTransform {
/**
* The size of the modified HTML in characters.
- *
- * @return int
*/
public function getModifiedHtmlSize(): int {
return mb_strlen( $this->modifiedPageBundle->html );
@@ -301,8 +295,6 @@ class HtmlToContentTransform {
/**
* NOTE: The return value of this method depends on
* setOriginalData() having been called first.
- *
- * @return bool
*/
public function hasOriginalHtml(): bool {
return $this->originalPageBundle->html !== '';
@@ -311,8 +303,6 @@ class HtmlToContentTransform {
/**
* NOTE: The return value of this method depends on
* setOriginalData() having been called first.
- *
- * @return bool
*/
public function hasOriginalDataParsoid(): bool {
return $this->originalPageBundle->parsoid !== null;
@@ -410,8 +400,6 @@ class HtmlToContentTransform {
/**
* NOTE: The return value of this method depends on
* setOriginalData() having been called first.
- *
- * @return string
*/
public function getSchemaVersion(): string {
// Get the content version of the edited doc, if available.
@@ -581,8 +569,6 @@ class HtmlToContentTransform {
/**
* Returns a Content object derived from the supplied HTML.
- *
- * @return Content
*/
public function htmlToContent(): Content {
$text = $this->htmlToText();
diff --git a/includes/parser/Parsoid/LanguageVariantConverter.php b/includes/parser/Parsoid/LanguageVariantConverter.php
index 7a0ae634f55a..8a555f17f1ea 100644
--- a/includes/parser/Parsoid/LanguageVariantConverter.php
+++ b/includes/parser/Parsoid/LanguageVariantConverter.php
@@ -187,7 +187,6 @@ class LanguageVariantConverter {
/**
* Disable fallback language variant converter
- * @return void
*/
public function disableFallbackLanguageConverter(): void {
$this->isFallbackLanguageConverterEnabled = false;
diff --git a/includes/password/Password.php b/includes/password/Password.php
index 18f18dc25b7d..32b0a1c8604b 100644
--- a/includes/password/Password.php
+++ b/includes/password/Password.php
@@ -126,8 +126,6 @@ abstract class Password {
/**
* Whether current password type is supported on this system.
- *
- * @return bool
*/
protected function isSupported(): bool {
return true;
diff --git a/includes/password/PasswordFactory.php b/includes/password/PasswordFactory.php
index 1de40fe546ea..123a08caa290 100644
--- a/includes/password/PasswordFactory.php
+++ b/includes/password/PasswordFactory.php
@@ -106,8 +106,6 @@ final class PasswordFactory {
/**
* Get the default password type
- *
- * @return string
*/
public function getDefaultType(): string {
return $this->default;
@@ -256,8 +254,6 @@ final class PasswordFactory {
/**
* Create an InvalidPassword
- *
- * @return InvalidPassword
*/
public static function newInvalidPassword(): InvalidPassword {
static $password = null;
diff --git a/includes/profiler/SectionProfileCallback.php b/includes/profiler/SectionProfileCallback.php
index 917f0a731e1d..ba163a7b003a 100644
--- a/includes/profiler/SectionProfileCallback.php
+++ b/includes/profiler/SectionProfileCallback.php
@@ -30,10 +30,6 @@ class SectionProfileCallback extends ScopedCallback {
protected SectionProfiler $profiler;
protected string $section;
- /**
- * @param SectionProfiler $profiler
- * @param string $section
- */
public function __construct( SectionProfiler $profiler, string $section ) {
parent::__construct( null );
$this->profiler = $profiler;
diff --git a/includes/recentchanges/CategoryMembershipChange.php b/includes/recentchanges/CategoryMembershipChange.php
index 5ec3aa7fa150..ba86ab0a195f 100644
--- a/includes/recentchanges/CategoryMembershipChange.php
+++ b/includes/recentchanges/CategoryMembershipChange.php
@@ -117,8 +117,6 @@ class CategoryMembershipChange {
/**
* Create a recentchanges entry for category additions
- *
- * @param PageIdentity $categoryPage
*/
public function triggerCategoryAddedNotification( PageIdentity $categoryPage ) {
$this->createRecentChangesEntry( $categoryPage, self::CATEGORY_ADDITION );
@@ -126,8 +124,6 @@ class CategoryMembershipChange {
/**
* Create a recentchanges entry for category removals
- *
- * @param PageIdentity $categoryPage
*/
public function triggerCategoryRemovedNotification( PageIdentity $categoryPage ) {
$this->createRecentChangesEntry( $categoryPage, self::CATEGORY_REMOVAL );
diff --git a/includes/recentchanges/ChangeTrackingEventIngress.php b/includes/recentchanges/ChangeTrackingEventIngress.php
index 259c3577fbf4..00e956053dff 100644
--- a/includes/recentchanges/ChangeTrackingEventIngress.php
+++ b/includes/recentchanges/ChangeTrackingEventIngress.php
@@ -48,10 +48,6 @@ class ChangeTrackingEventIngress extends EventSubscriberBase {
private ChangeTagsStore $changeTagsStore;
private UserEditTracker $userEditTracker;
- /**
- * @param ChangeTagsStore $changeTagsStore
- * @param UserEditTracker $userEditTracker
- */
public function __construct(
ChangeTagsStore $changeTagsStore,
UserEditTracker $userEditTracker
diff --git a/includes/recentchanges/EnhancedChangesList.php b/includes/recentchanges/EnhancedChangesList.php
index 1917a3381f75..db718bb64d45 100644
--- a/includes/recentchanges/EnhancedChangesList.php
+++ b/includes/recentchanges/EnhancedChangesList.php
@@ -115,8 +115,6 @@ class EnhancedChangesList extends ChangesList {
/**
* Put accumulated information into the cache, for later display.
* Page moves go on their own line.
- *
- * @param RCCacheEntry $cacheEntry
*/
protected function addCacheEntry( RCCacheEntry $cacheEntry ) {
$cacheGroupingKey = $this->makeCacheGroupingKey( $cacheEntry );
diff --git a/includes/recentchanges/RCCacheEntryFactory.php b/includes/recentchanges/RCCacheEntryFactory.php
index 9546bba800ce..7e911d2d0203 100644
--- a/includes/recentchanges/RCCacheEntryFactory.php
+++ b/includes/recentchanges/RCCacheEntryFactory.php
@@ -44,14 +44,7 @@ class RCCacheEntryFactory {
*/
private $linkRenderer;
- /**
- * @var MapCacheLRU
- */
private MapCacheLRU $userLinkCache;
-
- /**
- * @var MapCacheLRU
- */
private MapCacheLRU $toolLinkCache;
/**
diff --git a/includes/recentchanges/RCFeed/RCFeed.php b/includes/recentchanges/RCFeed/RCFeed.php
index 2ac15c7ed525..39ed8cc965bf 100644
--- a/includes/recentchanges/RCFeed/RCFeed.php
+++ b/includes/recentchanges/RCFeed/RCFeed.php
@@ -44,10 +44,6 @@ abstract class RCFeed {
*/
abstract public function notify( RecentChange $rc, $actionComment = null );
- /**
- * @param array $params
- * @return RCFeed
- */
final public static function factory( array $params ): RCFeed {
if ( !isset( $params['class'] ) ) {
if ( !isset( $params['uri'] ) ) {
diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php
index 94c60a57f1f2..085acdd852e5 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -587,8 +587,6 @@ class ExtensionProcessor implements Processor {
/**
* Register namespaces with the appropriate global settings
- *
- * @param array $info
*/
protected function extractNamespaces( array $info ) {
if ( isset( $info['namespaces'] ) ) {
@@ -761,8 +759,6 @@ class ExtensionProcessor implements Processor {
/**
* Extract any user rights that should be granted implicitly.
- *
- * @param array $info
*/
protected function extractImplicitRights( array $info ) {
// Rate limits are only configurable for rights that are either in wgImplicitRights
@@ -1036,10 +1032,6 @@ class ExtensionProcessor implements Processor {
return $autoload;
}
- /**
- * @param array $info
- * @param string $dir
- */
private function extractAutoload( array $info, string $dir ) {
if ( isset( $info['load_composer_autoloader'] ) && $info['load_composer_autoloader'] === true ) {
$file = "$dir/vendor/autoload.php";
diff --git a/includes/registration/ExtensionRegistry.php b/includes/registration/ExtensionRegistry.php
index 73dfa2824ce3..a52e02d5c13a 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -159,9 +159,6 @@ class ExtensionRegistry implements DomainEventSubscriber {
*/
private $cache = null;
- /**
- * @var ?SettingsBuilder
- */
private ?SettingsBuilder $settingsBuilder = null;
private static bool $accessDisabledForUnitTests = false;
diff --git a/includes/revisiondelete/RevDelArchivedRevisionItem.php b/includes/revisiondelete/RevDelArchivedRevisionItem.php
index 7f9b9dbbffd7..a83521671660 100644
--- a/includes/revisiondelete/RevDelArchivedRevisionItem.php
+++ b/includes/revisiondelete/RevDelArchivedRevisionItem.php
@@ -28,7 +28,6 @@ use Wikimedia\Rdbms\IConnectionProvider;
*/
class RevDelArchivedRevisionItem extends RevDelArchiveItem {
- /** @var IConnectionProvider */
protected IConnectionProvider $dbProvider;
/**
diff --git a/includes/revisiondelete/RevDelRevisionItem.php b/includes/revisiondelete/RevDelRevisionItem.php
index 7721fe6c9571..44990c9a6a06 100644
--- a/includes/revisiondelete/RevDelRevisionItem.php
+++ b/includes/revisiondelete/RevDelRevisionItem.php
@@ -55,8 +55,6 @@ class RevDelRevisionItem extends RevDelItem {
/**
* Get the RevisionRecord for the item
- *
- * @return RevisionRecord
*/
protected function getRevisionRecord(): RevisionRecord {
return $this->revisionRecord;
diff --git a/includes/revisionlist/RevisionItem.php b/includes/revisionlist/RevisionItem.php
index db897914fca7..197c8b29f80f 100644
--- a/includes/revisionlist/RevisionItem.php
+++ b/includes/revisionlist/RevisionItem.php
@@ -48,8 +48,6 @@ class RevisionItem extends RevisionItemBase {
/**
* Get the RevisionRecord for the item
- *
- * @return RevisionRecord
*/
protected function getRevisionRecord(): RevisionRecord {
return $this->revisionRecord;
diff --git a/includes/search/Entity/SearchResultThumbnail.php b/includes/search/Entity/SearchResultThumbnail.php
index 0bc0a7a0ec7f..48c9485a5275 100644
--- a/includes/search/Entity/SearchResultThumbnail.php
+++ b/includes/search/Entity/SearchResultThumbnail.php
@@ -86,7 +86,6 @@ class SearchResultThumbnail {
/**
* Full URL to the contents of the file
- * @return string
*/
public function getUrl(): string {
return $this->url;
diff --git a/includes/search/ISearchResultSet.php b/includes/search/ISearchResultSet.php
index 1fcda30ed6a2..21fc19a26f2c 100644
--- a/includes/search/ISearchResultSet.php
+++ b/includes/search/ISearchResultSet.php
@@ -157,7 +157,6 @@ interface ISearchResultSet extends \Countable, \IteratorAggregate {
/**
* Returns extra data for specific result and store it in SearchResult object.
- * @param SearchResult $result
*/
public function augmentResult( SearchResult $result );
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index 57e634d075d9..ce0783c393d8 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -836,8 +836,6 @@ abstract class SearchEngine {
/**
* Augment search results with extra data.
- *
- * @param ISearchResultSet $resultSet
*/
public function augmentSearchResults( ISearchResultSet $resultSet ) {
$setAugmentors = [];
diff --git a/includes/search/SearchResultSetTrait.php b/includes/search/SearchResultSetTrait.php
index e98a16d593f3..d3e23e900582 100644
--- a/includes/search/SearchResultSetTrait.php
+++ b/includes/search/SearchResultSetTrait.php
@@ -32,7 +32,6 @@ trait SearchResultSetTrait {
/**
* Returns extra data for specific result and store it in SearchResult object.
- * @param SearchResult $result
*/
public function augmentResult( SearchResult $result ) {
$id = $result->getTitle()->getArticleID();
diff --git a/includes/search/SearchSuggestionSet.php b/includes/search/SearchSuggestionSet.php
index efeb7124b637..562f20fc32e5 100644
--- a/includes/search/SearchSuggestionSet.php
+++ b/includes/search/SearchSuggestionSet.php
@@ -104,8 +104,6 @@ class SearchSuggestionSet {
* Add a new suggestion at the end.
* If the score of the new suggestion is greater than the worst one,
* the new suggestion score will be updated (worst - 1).
- *
- * @param SearchSuggestion $suggestion
*/
public function append( SearchSuggestion $suggestion ) {
$pageID = $suggestion->getSuggestedTitleID();
@@ -123,7 +121,6 @@ class SearchSuggestionSet {
/**
* Add suggestion set to the end of the current one.
- * @param SearchSuggestionSet $set
*/
public function appendAll( SearchSuggestionSet $set ) {
foreach ( $set->getSuggestions() as $sugg ) {
@@ -144,7 +141,6 @@ class SearchSuggestionSet {
/**
* Add a new suggestion at the top. If the new suggestion score
* is lower than the best one its score will be updated (best + 1)
- * @param SearchSuggestion $suggestion
*/
public function prepend( SearchSuggestion $suggestion ) {
$pageID = $suggestion->getSuggestedTitleID();
diff --git a/includes/session/MetadataMergeException.php b/includes/session/MetadataMergeException.php
index 868bb25e4287..ba84716dd61b 100644
--- a/includes/session/MetadataMergeException.php
+++ b/includes/session/MetadataMergeException.php
@@ -63,7 +63,6 @@ class MetadataMergeException extends UnexpectedValueException {
/**
* Set context data.
- * @param array $context
*/
public function setContext( array $context ) {
$this->context = $context;
diff --git a/includes/session/PHPSessionHandler.php b/includes/session/PHPSessionHandler.php
index bbdc722df64b..74b303c607b7 100644
--- a/includes/session/PHPSessionHandler.php
+++ b/includes/session/PHPSessionHandler.php
@@ -106,7 +106,6 @@ class PHPSessionHandler implements SessionHandlerInterface {
/**
* Install a session handler for the current web request
- * @param SessionManager $manager
*/
public static function install( SessionManager $manager ) {
if ( self::$instance ) {
diff --git a/includes/session/Session.php b/includes/session/Session.php
index 16cb2ebb8998..554483195637 100644
--- a/includes/session/Session.php
+++ b/includes/session/Session.php
@@ -172,7 +172,6 @@ class Session implements \Countable, \Iterator, \ArrayAccess {
/**
* Returns the authenticated user for this session
- * @return User
*/
public function getUser(): User {
return $this->backend->getUser();
diff --git a/includes/session/SessionBackend.php b/includes/session/SessionBackend.php
index cafff37808f0..4b9cb4911e61 100644
--- a/includes/session/SessionBackend.php
+++ b/includes/session/SessionBackend.php
@@ -413,7 +413,6 @@ final class SessionBackend {
/**
* Returns the authenticated user for this session
- * @return User
*/
public function getUser(): User {
return $this->user;
diff --git a/includes/session/SessionManager.php b/includes/session/SessionManager.php
index 63bd6362d518..aef2bbac88be 100644
--- a/includes/session/SessionManager.php
+++ b/includes/session/SessionManager.php
@@ -124,8 +124,6 @@ class SessionManager implements SessionManagerInterface {
/**
* If PHP's session_id() has been set, returns that session. Otherwise
* returns the session for RequestContext::getMain()->getRequest().
- *
- * @return Session
*/
public static function getGlobalSession(): Session {
if ( !PHPSessionHandler::isEnabled() ) {
diff --git a/includes/session/SessionManagerInterface.php b/includes/session/SessionManagerInterface.php
index 568788ac6793..6b1dc5d6e562 100644
--- a/includes/session/SessionManagerInterface.php
+++ b/includes/session/SessionManagerInterface.php
@@ -81,8 +81,6 @@ interface SessionManagerInterface extends LoggerAwareInterface {
* After calling this, existing sessions should be invalid. For mutable
* session providers, this generally means the user has to log in again;
* for immutable providers, it generally means the loss of session data.
- *
- * @param User $user
*/
public function invalidateSessionsForUser( User $user );
diff --git a/includes/session/SessionProvider.php b/includes/session/SessionProvider.php
index 660d746b4071..070604af4d6b 100644
--- a/includes/session/SessionProvider.php
+++ b/includes/session/SessionProvider.php
@@ -224,11 +224,6 @@ abstract class SessionProvider implements Stringable, SessionProviderInterface {
$this->hookRunner = new HookRunner( $hookContainer );
}
- /**
- * Get the HookContainer
- *
- * @return HookContainer
- */
protected function getHookContainer(): HookContainer {
return $this->hookContainer;
}
diff --git a/includes/shell/CommandFactory.php b/includes/shell/CommandFactory.php
index 8acea542f2a5..7bc88055b27d 100644
--- a/includes/shell/CommandFactory.php
+++ b/includes/shell/CommandFactory.php
@@ -133,8 +133,6 @@ class CommandFactory {
/**
* Instantiates a new Command
- *
- * @return Command
*/
public function create(): Command {
$allUsers = false;
diff --git a/includes/shell/Shell.php b/includes/shell/Shell.php
index 48bf9b03de23..fa81c20b4ca7 100644
--- a/includes/shell/Shell.php
+++ b/includes/shell/Shell.php
@@ -133,8 +133,6 @@ class Shell {
/**
* Check if this class is effectively disabled via php.ini config
- *
- * @return bool
*/
public static function isDisabled(): bool {
static $disabled = null;
diff --git a/includes/site/CachingSiteStore.php b/includes/site/CachingSiteStore.php
index c7fb4dc1ddd2..398e72b77ac0 100644
--- a/includes/site/CachingSiteStore.php
+++ b/includes/site/CachingSiteStore.php
@@ -41,10 +41,6 @@ class CachingSiteStore implements SiteStore {
/** @var SiteList|null */
private $sites = null;
- /**
- * @param SiteStore $siteStore
- * @param BagOStuff $cache
- */
public function __construct(
SiteStore $siteStore,
BagOStuff $cache
diff --git a/includes/site/SiteExporter.php b/includes/site/SiteExporter.php
index 727bd28216b9..6f2a5c8d20e0 100644
--- a/includes/site/SiteExporter.php
+++ b/includes/site/SiteExporter.php
@@ -75,8 +75,6 @@ class SiteExporter {
/**
* Writes a <site> tag representing the given Site object.
- *
- * @param Site $site
*/
private function exportSite( Site $site ) {
if ( $site->getType() !== Site::TYPE_UNKNOWN ) {
diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php
index e46fb3db859c..4d86efd094c2 100644
--- a/includes/skins/BaseTemplate.php
+++ b/includes/skins/BaseTemplate.php
@@ -262,8 +262,6 @@ abstract class BaseTemplate extends QuickTemplate {
/**
* Unsets any elements in an array of icon definitions which do
* not have src attributes or are not strings.
- *
- * @param array &$icons
*/
private function unsetIconsWithoutImages( array &$icons ) {
// Unset any icons which don't have an image
diff --git a/includes/skins/QuickTemplate.php b/includes/skins/QuickTemplate.php
index 47eb10c2ddc0..defe7da8bb5f 100644
--- a/includes/skins/QuickTemplate.php
+++ b/includes/skins/QuickTemplate.php
@@ -120,8 +120,6 @@ abstract class QuickTemplate {
/**
* Checks if the template key is deprecated
- *
- * @param string $name
*/
private function checkDeprecationStatus( string $name ) {
$deprecated = $this->deprecated[ $name ] ?? false;
diff --git a/includes/skins/components/SkinComponentCopyright.php b/includes/skins/components/SkinComponentCopyright.php
index d09efcb0f951..97bd86dde2ef 100644
--- a/includes/skins/components/SkinComponentCopyright.php
+++ b/includes/skins/components/SkinComponentCopyright.php
@@ -41,11 +41,6 @@ class SkinComponentCopyright implements SkinComponent {
];
}
- /**
- * Get the copyright.
- *
- * @return string
- */
public function getCopyrightHTML(): string {
$out = $this->skinContext->getOutput();
$title = $out->getTitle();
diff --git a/includes/skins/components/SkinComponentFooter.php b/includes/skins/components/SkinComponentFooter.php
index 2dbe7cf637d4..93bfa73de398 100644
--- a/includes/skins/components/SkinComponentFooter.php
+++ b/includes/skins/components/SkinComponentFooter.php
@@ -24,8 +24,6 @@ class SkinComponentFooter implements SkinComponent {
/**
* Run SkinAddFooterLinks hook on menu data to insert additional menu items specifically in footer.
- *
- * @return array
*/
private function getTemplateDataFooter(): array {
$data = [
diff --git a/includes/skins/components/SkinComponentLink.php b/includes/skins/components/SkinComponentLink.php
index fc79dee327e8..57d42651bfcf 100644
--- a/includes/skins/components/SkinComponentLink.php
+++ b/includes/skins/components/SkinComponentLink.php
@@ -50,10 +50,6 @@ class SkinComponentLink implements SkinComponent {
$this->options = $options;
}
- /**
- * @param string $key
- * @return Message
- */
private function msg( string $key ): Message {
return $this->localizer->msg( $key );
}
diff --git a/includes/skins/components/SkinComponentLogo.php b/includes/skins/components/SkinComponentLogo.php
index 3697e11af2bd..0f07c15b1402 100644
--- a/includes/skins/components/SkinComponentLogo.php
+++ b/includes/skins/components/SkinComponentLogo.php
@@ -32,18 +32,11 @@ class SkinComponentLogo implements SkinComponent {
/** @var string|null */
private $language;
- /**
- * @param Config $config
- * @param Language $language
- */
public function __construct( Config $config, Language $language ) {
$this->config = $config;
$this->language = $language->getCode();
}
- /**
- * @return string|null
- */
private function getLanguage(): ?string {
return $this->language;
}
diff --git a/includes/skins/components/SkinComponentMenu.php b/includes/skins/components/SkinComponentMenu.php
index 960dddee2c4c..42991ceec10d 100644
--- a/includes/skins/components/SkinComponentMenu.php
+++ b/includes/skins/components/SkinComponentMenu.php
@@ -62,11 +62,6 @@ class SkinComponentMenu implements SkinComponent {
$this->htmlBeforeContent = $htmlBeforeContent;
}
- /**
- * @param string $key
- *
- * @return Message
- */
private function msg( string $key ): Message {
return $this->localizer->msg( $key );
}
diff --git a/includes/skins/components/SkinComponentSearch.php b/includes/skins/components/SkinComponentSearch.php
index ca588472a9ef..e5798141a6d8 100644
--- a/includes/skins/components/SkinComponentSearch.php
+++ b/includes/skins/components/SkinComponentSearch.php
@@ -59,10 +59,6 @@ class SkinComponentSearch implements SkinComponent {
return $this->localizer;
}
- /**
- * @param string $key
- * @return Message
- */
private function msg( string $key ): Message {
return $this->localizer->msg( $key );
}
diff --git a/includes/skins/components/SkinComponentTableOfContents.php b/includes/skins/components/SkinComponentTableOfContents.php
index 51ba4b786b02..143f3d604990 100644
--- a/includes/skins/components/SkinComponentTableOfContents.php
+++ b/includes/skins/components/SkinComponentTableOfContents.php
@@ -72,8 +72,6 @@ class SkinComponentTableOfContents implements SkinComponent {
*
* For an example of how to render the data, see TableOfContents.mustache in
* the Vector skin.
- *
- * @return array
*/
private function getTOCDataInternal(): array {
$tocData = $this->output->getTOCData();
diff --git a/includes/sparql/SparqlClient.php b/includes/sparql/SparqlClient.php
index 6a4bfe3ba0dd..8546d812ae23 100644
--- a/includes/sparql/SparqlClient.php
+++ b/includes/sparql/SparqlClient.php
@@ -90,7 +90,6 @@ class SparqlClient {
/**
* Get current user agent.
- * @return string
*/
public function getUserAgent(): string {
return $this->userAgent;
@@ -113,8 +112,6 @@ class SparqlClient {
* This is the recommended way of specifying the user agent
* for specific applications of the SparqlClient inside MediaWiki
* and extension code.
- *
- * @param string $agent
*/
public function appendUserAgent( string $agent ) {
$this->userAgent .= ' ' . $agent;
diff --git a/includes/specialpage/AuthManagerSpecialPage.php b/includes/specialpage/AuthManagerSpecialPage.php
index 681a9ce0397e..f838655ce0f9 100644
--- a/includes/specialpage/AuthManagerSpecialPage.php
+++ b/includes/specialpage/AuthManagerSpecialPage.php
@@ -798,7 +798,6 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
* Sort the fields of a form descriptor by their 'weight' property. (Fields with higher weight
* are shown closer to the bottom; weight defaults to 0. Negative weight is allowed.)
* Keep order if weights are equal.
- * @param array &$formDescriptor
*/
protected static function sortFormDescriptorFields( array &$formDescriptor ) {
$i = 0;
diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php
index 6aa1d1118257..2b34a70bd963 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -603,7 +603,6 @@ abstract class ChangesListSpecialPage extends SpecialPage {
/**
* Removes registration filters from filterGroupDefinitions
- * @return void
*/
private function removeRegistrationFilterDefinitions(): void {
foreach ( $this->filterGroupDefinitions as $key => $value ) {
@@ -1227,8 +1226,6 @@ abstract class ChangesListSpecialPage extends SpecialPage {
/**
* Register a structured changes list filter group
- *
- * @param ChangesListFilterGroup $group
*/
public function registerFilterGroup( ChangesListFilterGroup $group ) {
$groupName = $group->getName();
@@ -1351,8 +1348,6 @@ abstract class ChangesListSpecialPage extends SpecialPage {
/**
* Validate a FormOptions object generated by getDefaultOptions() with values already populated.
- *
- * @param FormOptions $opts
*/
public function validateOptions( FormOptions $opts ) {
$isContradictory = $this->fixContradictoryOptions( $opts );
@@ -1615,8 +1610,6 @@ abstract class ChangesListSpecialPage extends SpecialPage {
/**
* Which database to use for read queries
- *
- * @return IReadableDatabase
*/
protected function getDB(): IReadableDatabase {
return MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
@@ -1677,8 +1670,6 @@ abstract class ChangesListSpecialPage extends SpecialPage {
* Send the text to be displayed before the options.
* Should use $this->getOutput()->addWikiTextAsInterface()
* or similar methods to print the text.
- *
- * @param FormOptions $opts
*/
public function setTopText( FormOptions $opts ) {
// nothing by default
@@ -1688,8 +1679,6 @@ abstract class ChangesListSpecialPage extends SpecialPage {
* Send the text to be displayed after the options.
* Should use $this->getOutput()->addWikiTextAsInterface()
* or similar methods to print the text.
- *
- * @param FormOptions $opts
*/
public function setBottomText( FormOptions $opts ) {
// nothing by default
diff --git a/includes/specialpage/FormSpecialPage.php b/includes/specialpage/FormSpecialPage.php
index 582cbd5a4a84..8605ce8f0ba8 100644
--- a/includes/specialpage/FormSpecialPage.php
+++ b/includes/specialpage/FormSpecialPage.php
@@ -97,7 +97,6 @@ abstract class FormSpecialPage extends SpecialPage {
/**
* Play with the HTMLForm if you need to more substantially
- * @param HTMLForm $form
*/
protected function alterForm( HTMLForm $form ) {
}
diff --git a/includes/specialpage/SpecialPageFactory.php b/includes/specialpage/SpecialPageFactory.php
index aed9cb398a3a..8b43f40582a7 100644
--- a/includes/specialpage/SpecialPageFactory.php
+++ b/includes/specialpage/SpecialPageFactory.php
@@ -1359,8 +1359,6 @@ class SpecialPageFactory {
/**
* Get the special page list as an array
- *
- * @return array
*/
private function getPageList(): array {
if ( !is_array( $this->list ) ) {
@@ -1464,7 +1462,6 @@ class SpecialPageFactory {
* Initialise and return the list of special page aliases. Returns an array where
* the key is an alias, and the value is the canonical name of the special page.
* All registered special pages are guaranteed to map to themselves.
- * @return array
*/
private function getAliasList(): array {
if ( $this->aliases === null ) {
diff --git a/includes/specials/Contribute/ContributeFactory.php b/includes/specials/Contribute/ContributeFactory.php
index fe8c1af3e09a..8162aff6d24f 100644
--- a/includes/specials/Contribute/ContributeFactory.php
+++ b/includes/specials/Contribute/ContributeFactory.php
@@ -33,10 +33,6 @@ class ContributeFactory {
private MessageLocalizer $localizer;
private HookRunner $hookRunner;
- /**
- * @param MessageLocalizer $localizer
- * @param HookRunner $hookRunner
- */
public function __construct( MessageLocalizer $localizer, HookRunner $hookRunner ) {
$this->localizer = $localizer;
$this->hookRunner = $hookRunner;
diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php
index ea53389b601c..44c72faef7ab 100644
--- a/includes/specials/SpecialBlock.php
+++ b/includes/specials/SpecialBlock.php
@@ -101,10 +101,7 @@ class SpecialBlock extends FormSpecialPage {
*/
protected $preErrors = [];
- /** @var bool */
protected bool $useCodex = false;
-
- /** @var bool */
protected bool $useMultiblocks = false;
/**
@@ -290,8 +287,6 @@ class SpecialBlock extends FormSpecialPage {
/**
* Customizes the HTMLForm a bit
- *
- * @param HTMLForm $form
*/
protected function alterForm( HTMLForm $form ) {
$form->setHeaderHtml( '' );
diff --git a/includes/specials/SpecialBookSources.php b/includes/specials/SpecialBookSources.php
index 474badf234e5..502639c843e8 100644
--- a/includes/specials/SpecialBookSources.php
+++ b/includes/specials/SpecialBookSources.php
@@ -43,10 +43,6 @@ class SpecialBookSources extends SpecialPage {
private RevisionLookup $revisionLookup;
private TitleFactory $titleFactory;
- /**
- * @param RevisionLookup $revisionLookup
- * @param TitleFactory $titleFactory
- */
public function __construct(
RevisionLookup $revisionLookup,
TitleFactory $titleFactory
diff --git a/includes/specials/SpecialCategories.php b/includes/specials/SpecialCategories.php
index 246fb561b1b6..55cbe89aaefc 100644
--- a/includes/specials/SpecialCategories.php
+++ b/includes/specials/SpecialCategories.php
@@ -36,10 +36,6 @@ class SpecialCategories extends SpecialPage {
private LinkBatchFactory $linkBatchFactory;
private IConnectionProvider $dbProvider;
- /**
- * @param LinkBatchFactory $linkBatchFactory
- * @param IConnectionProvider $dbProvider
- */
public function __construct(
LinkBatchFactory $linkBatchFactory,
IConnectionProvider $dbProvider
diff --git a/includes/specials/SpecialComparePages.php b/includes/specials/SpecialComparePages.php
index 191cf6a70bdd..dac7d2be5f94 100644
--- a/includes/specials/SpecialComparePages.php
+++ b/includes/specials/SpecialComparePages.php
@@ -44,10 +44,6 @@ class SpecialComparePages extends SpecialPage {
/** @var DifferenceEngine */
private $differenceEngine;
- /**
- * @param RevisionLookup $revisionLookup
- * @param IContentHandlerFactory $contentHandlerFactory
- */
public function __construct(
RevisionLookup $revisionLookup,
IContentHandlerFactory $contentHandlerFactory
diff --git a/includes/specials/SpecialContribute.php b/includes/specials/SpecialContribute.php
index f0f2b028d069..7ac910fbaef9 100644
--- a/includes/specials/SpecialContribute.php
+++ b/includes/specials/SpecialContribute.php
@@ -91,8 +91,6 @@ class SpecialContribute extends IncludableSpecialPage {
/**
* Check if skin is allowed to access the Special:Contribute page
* and the page have enough cards to be enabled
- *
- * @return bool
*/
public function isShowable(): bool {
return ContributeFactory::isEnabledOnCurrentSkin(
diff --git a/includes/specials/SpecialListDuplicatedFiles.php b/includes/specials/SpecialListDuplicatedFiles.php
index fd2fb1ddba98..64b293a75e7d 100644
--- a/includes/specials/SpecialListDuplicatedFiles.php
+++ b/includes/specials/SpecialListDuplicatedFiles.php
@@ -41,10 +41,6 @@ use Wikimedia\Rdbms\IResultWrapper;
*/
class SpecialListDuplicatedFiles extends QueryPage {
- /**
- * @param IConnectionProvider $dbProvider
- * @param LinkBatchFactory $linkBatchFactory
- */
public function __construct(
IConnectionProvider $dbProvider,
LinkBatchFactory $linkBatchFactory
diff --git a/includes/specials/SpecialMute.php b/includes/specials/SpecialMute.php
index e935a1268985..943b97ca7614 100644
--- a/includes/specials/SpecialMute.php
+++ b/includes/specials/SpecialMute.php
@@ -136,9 +136,6 @@ class SpecialMute extends FormSpecialPage {
return $this->msg( 'specialmute' );
}
- /**
- * @return UserIdentity|null
- */
private function getTarget(): ?UserIdentity {
return $this->target;
}
diff --git a/includes/specials/SpecialMyLanguage.php b/includes/specials/SpecialMyLanguage.php
index 1d5696adcf15..b6324b579190 100644
--- a/includes/specials/SpecialMyLanguage.php
+++ b/includes/specials/SpecialMyLanguage.php
@@ -41,10 +41,6 @@ class SpecialMyLanguage extends RedirectSpecialArticle {
private LanguageNameUtils $languageNameUtils;
private RedirectLookup $redirectLookup;
- /**
- * @param LanguageNameUtils $languageNameUtils
- * @param RedirectLookup $redirectLookup
- */
public function __construct(
LanguageNameUtils $languageNameUtils,
RedirectLookup $redirectLookup
diff --git a/includes/specials/SpecialPageData.php b/includes/specials/SpecialPageData.php
index 9b5100f959c9..6bc7d3953a11 100644
--- a/includes/specials/SpecialPageData.php
+++ b/includes/specials/SpecialPageData.php
@@ -50,8 +50,6 @@ class SpecialPageData extends UnlistedSpecialPage {
*
* If no request handler is set using this method, a default handler is created
* on demand by initDependencies().
- *
- * @param PageDataRequestHandler $requestHandler
*/
public function setRequestHandler( PageDataRequestHandler $requestHandler ) {
$this->requestHandler = $requestHandler;
diff --git a/includes/specials/SpecialPrefixIndex.php b/includes/specials/SpecialPrefixIndex.php
index ee67fc0873b9..8d3c13a8038e 100644
--- a/includes/specials/SpecialPrefixIndex.php
+++ b/includes/specials/SpecialPrefixIndex.php
@@ -53,10 +53,6 @@ class SpecialPrefixIndex extends SpecialAllPages {
private IConnectionProvider $dbProvider;
private LinkCache $linkCache;
- /**
- * @param IConnectionProvider $dbProvider
- * @param LinkCache $linkCache
- */
public function __construct(
IConnectionProvider $dbProvider,
LinkCache $linkCache
diff --git a/includes/specials/SpecialProtectedTitles.php b/includes/specials/SpecialProtectedTitles.php
index 3e41cd5fe0ef..2be4f511b0e6 100644
--- a/includes/specials/SpecialProtectedTitles.php
+++ b/includes/specials/SpecialProtectedTitles.php
@@ -34,13 +34,10 @@ use Wikimedia\Rdbms\IConnectionProvider;
* @ingroup SpecialPage
*/
class SpecialProtectedTitles extends SpecialPage {
+
private LinkBatchFactory $linkBatchFactory;
private IConnectionProvider $dbProvider;
- /**
- * @param LinkBatchFactory $linkBatchFactory
- * @param IConnectionProvider $dbProvider
- */
public function __construct(
LinkBatchFactory $linkBatchFactory,
IConnectionProvider $dbProvider
diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php
index cd3acfbd5114..9b125a33eae8 100644
--- a/includes/specials/SpecialRandomInCategory.php
+++ b/includes/specials/SpecialRandomInCategory.php
@@ -75,7 +75,6 @@ class SpecialRandomInCategory extends FormSpecialPage {
/**
* Set which category to use.
- * @param Title $cat
*/
public function setCategory( Title $cat ) {
$this->category = $cat;
diff --git a/includes/specials/SpecialRandomPage.php b/includes/specials/SpecialRandomPage.php
index 35b959a795fe..29babcfd45aa 100644
--- a/includes/specials/SpecialRandomPage.php
+++ b/includes/specials/SpecialRandomPage.php
@@ -41,10 +41,6 @@ class SpecialRandomPage extends SpecialPage {
private IConnectionProvider $dbProvider;
- /**
- * @param IConnectionProvider $dbProvider
- * @param NamespaceInfo $nsInfo
- */
public function __construct(
IConnectionProvider $dbProvider,
NamespaceInfo $nsInfo
diff --git a/includes/specials/SpecialRandomRedirect.php b/includes/specials/SpecialRandomRedirect.php
index 1bdbd938aac6..1cd97b80b24c 100644
--- a/includes/specials/SpecialRandomRedirect.php
+++ b/includes/specials/SpecialRandomRedirect.php
@@ -31,10 +31,6 @@ use Wikimedia\Rdbms\IConnectionProvider;
*/
class SpecialRandomRedirect extends SpecialRandomPage {
- /**
- * @param IConnectionProvider $dbProvider
- * @param NamespaceInfo $nsInfo
- */
public function __construct(
IConnectionProvider $dbProvider,
NamespaceInfo $nsInfo
diff --git a/includes/specials/SpecialRandomRootPage.php b/includes/specials/SpecialRandomRootPage.php
index 90aea2b35bcd..3ee08e9c6494 100644
--- a/includes/specials/SpecialRandomRootPage.php
+++ b/includes/specials/SpecialRandomRootPage.php
@@ -34,10 +34,6 @@ use Wikimedia\Rdbms\LikeValue;
*/
class SpecialRandomRootPage extends SpecialRandomPage {
- /**
- * @param IConnectionProvider $dbProvider
- * @param NamespaceInfo $nsInfo
- */
public function __construct(
IConnectionProvider $dbProvider,
NamespaceInfo $nsInfo
diff --git a/includes/specials/SpecialRecentChanges.php b/includes/specials/SpecialRecentChanges.php
index 2f1a7f65ac94..a063a206ade2 100644
--- a/includes/specials/SpecialRecentChanges.php
+++ b/includes/specials/SpecialRecentChanges.php
@@ -239,8 +239,6 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
/**
* Whether or not the current query needs to use watchlist data: check that the current user can
* use their watchlist and that this special page isn't being transcluded.
- *
- * @return bool
*/
private function needsWatchlistFeatures(): bool {
return !$this->including()
diff --git a/includes/specials/SpecialRedirect.php b/includes/specials/SpecialRedirect.php
index 9b88a2ff2572..4c0c56717512 100644
--- a/includes/specials/SpecialRedirect.php
+++ b/includes/specials/SpecialRedirect.php
@@ -64,10 +64,6 @@ class SpecialRedirect extends FormSpecialPage {
private RepoGroup $repoGroup;
private UserFactory $userFactory;
- /**
- * @param RepoGroup $repoGroup
- * @param UserFactory $userFactory
- */
public function __construct(
RepoGroup $repoGroup,
UserFactory $userFactory
diff --git a/includes/specials/SpecialResetTokens.php b/includes/specials/SpecialResetTokens.php
index c3772e6fb0dc..0a772bb2f943 100644
--- a/includes/specials/SpecialResetTokens.php
+++ b/includes/specials/SpecialResetTokens.php
@@ -129,7 +129,6 @@ class SpecialResetTokens extends FormSpecialPage {
/**
* Suppress the submit button if there's nothing to do;
* provide additional message on it otherwise.
- * @param HTMLForm $form
*/
protected function alterForm( HTMLForm $form ) {
$form->setSubmitDestructive();
diff --git a/includes/specials/SpecialRunJobs.php b/includes/specials/SpecialRunJobs.php
index 8c3fff8e4915..a4aae06676e5 100644
--- a/includes/specials/SpecialRunJobs.php
+++ b/includes/specials/SpecialRunJobs.php
@@ -41,10 +41,6 @@ class SpecialRunJobs extends UnlistedSpecialPage {
private JobRunner $jobRunner;
private ReadOnlyMode $readOnlyMode;
- /**
- * @param JobRunner $jobRunner
- * @param ReadOnlyMode $readOnlyMode
- */
public function __construct(
JobRunner $jobRunner,
ReadOnlyMode $readOnlyMode
diff --git a/includes/specials/SpecialTrackingCategories.php b/includes/specials/SpecialTrackingCategories.php
index 810c53d1f1d1..819fe5bdbc99 100644
--- a/includes/specials/SpecialTrackingCategories.php
+++ b/includes/specials/SpecialTrackingCategories.php
@@ -40,10 +40,6 @@ class SpecialTrackingCategories extends SpecialPage {
private LinkBatchFactory $linkBatchFactory;
private TrackingCategories $trackingCategories;
- /**
- * @param LinkBatchFactory $linkBatchFactory
- * @param TrackingCategories $trackingCategories
- */
public function __construct(
LinkBatchFactory $linkBatchFactory,
TrackingCategories $trackingCategories
diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php
index 0399425c21a4..04a68265fca2 100644
--- a/includes/specials/SpecialUnblock.php
+++ b/includes/specials/SpecialUnblock.php
@@ -61,7 +61,6 @@ class SpecialUnblock extends SpecialPage {
private UserNamePrefixSearch $userNamePrefixSearch;
private WatchlistManager $watchlistManager;
- /** @var bool */
protected bool $useCodex = false;
/**
diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php
index 2c380441da69..d2d839ea7965 100644
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -965,10 +965,6 @@ class SpecialUndelete extends SpecialPage {
$this->localRepo->streamFileWithStatus( $path );
}
- /**
- * @param LinkBatch $batch
- * @param IResultWrapper $revisions
- */
private function addRevisionsToBatch( LinkBatch $batch, IResultWrapper $revisions ) {
foreach ( $revisions as $row ) {
$batch->add( NS_USER, $row->ar_user_text );
@@ -976,10 +972,6 @@ class SpecialUndelete extends SpecialPage {
}
}
- /**
- * @param LinkBatch $batch
- * @param IResultWrapper $files
- */
private function addFilesToBatch( LinkBatch $batch, IResultWrapper $files ) {
foreach ( $files as $row ) {
$batch->add( NS_USER, $row->fa_user_text );
diff --git a/includes/specials/SpecialUnusedCategories.php b/includes/specials/SpecialUnusedCategories.php
index db518679baf3..dacc7888edab 100644
--- a/includes/specials/SpecialUnusedCategories.php
+++ b/includes/specials/SpecialUnusedCategories.php
@@ -34,10 +34,6 @@ use Wikimedia\Rdbms\IConnectionProvider;
*/
class SpecialUnusedCategories extends QueryPage {
- /**
- * @param IConnectionProvider $dbProvider
- * @param LinkBatchFactory $linkBatchFactory
- */
public function __construct(
IConnectionProvider $dbProvider,
LinkBatchFactory $linkBatchFactory
diff --git a/includes/specials/SpecialUnusedTemplates.php b/includes/specials/SpecialUnusedTemplates.php
index 47a7c7bfde2c..dd7a4f56ff23 100644
--- a/includes/specials/SpecialUnusedTemplates.php
+++ b/includes/specials/SpecialUnusedTemplates.php
@@ -41,10 +41,6 @@ class SpecialUnusedTemplates extends QueryPage {
private LinksMigration $linksMigration;
- /**
- * @param IConnectionProvider $dbProvider
- * @param LinksMigration $linksMigration
- */
public function __construct(
IConnectionProvider $dbProvider,
LinksMigration $linksMigration
diff --git a/includes/specials/pagers/ImageListPager.php b/includes/specials/pagers/ImageListPager.php
index df3d60f22739..9f02fa621030 100644
--- a/includes/specials/pagers/ImageListPager.php
+++ b/includes/specials/pagers/ImageListPager.php
@@ -532,7 +532,6 @@ class ImageListPager extends TablePager {
/**
* Escape the options list
- * @return array
*/
private function getEscapedLimitSelectList(): array {
$list = $this->getLimitSelectList();
diff --git a/includes/specials/pagers/UploadStashPager.php b/includes/specials/pagers/UploadStashPager.php
index 4f3bd0a7c827..9e79cf2ac2df 100644
--- a/includes/specials/pagers/UploadStashPager.php
+++ b/includes/specials/pagers/UploadStashPager.php
@@ -161,7 +161,6 @@ class UploadStashPager extends TablePager {
/**
* Escape the options list
- * @return array
*/
private function getEscapedLimitSelectList(): array {
$list = $this->getLimitSelectList();
diff --git a/includes/telemetry/MediaWikiPropagator.php b/includes/telemetry/MediaWikiPropagator.php
index c1705a14b15e..7bbf66f0ba14 100644
--- a/includes/telemetry/MediaWikiPropagator.php
+++ b/includes/telemetry/MediaWikiPropagator.php
@@ -12,9 +12,7 @@ use Wikimedia\Telemetry\SpanContext;
* @internal
*/
class MediaWikiPropagator implements ContextPropagatorInterface {
- /**
- * @var TelemetryHeadersInterface
- */
+
private TelemetryHeadersInterface $mwTelemetry;
public function __construct( TelemetryHeadersInterface $mwTelemetry ) {
diff --git a/includes/title/Title.php b/includes/title/Title.php
index 15b60f7e8b30..55c5d15a9d9f 100644
--- a/includes/title/Title.php
+++ b/includes/title/Title.php
@@ -210,7 +210,6 @@ class Title implements Stringable, LinkTarget, PageIdentity {
/**
* Shorthand for getting a Language Converter for page's language
- * @return ILanguageConverter
*/
private function getPageLanguageConverter(): ILanguageConverter {
return $this->getLanguageConverter( $this->getPageLanguage() );
@@ -218,7 +217,6 @@ class Title implements Stringable, LinkTarget, PageIdentity {
/**
* Shorthand for getting a database connection provider
- * @return IConnectionProvider
*/
private function getDbProvider(): IConnectionProvider {
return MediaWikiServices::getInstance()->getConnectionProvider();
diff --git a/includes/user/ActorCache.php b/includes/user/ActorCache.php
index 60009cef68dd..4e2f38146830 100644
--- a/includes/user/ActorCache.php
+++ b/includes/user/ActorCache.php
@@ -99,10 +99,6 @@ class ActorCache {
$this->cache[self::KEY_USER_NAME][$actor->getName()] = $value;
}
- /**
- * Remove $actor from cache.
- * @param UserIdentity $actor
- */
public function remove( UserIdentity $actor ) {
$oldByName = $this->cache[self::KEY_USER_NAME][$actor->getName()] ?? null;
$oldByUserId = $this->cache[self::KEY_USER_ID][$actor->getId( $actor->getWikiId() )] ?? null;
diff --git a/includes/user/ActorStore.php b/includes/user/ActorStore.php
index 6837aed555b4..ced1c20e2535 100644
--- a/includes/user/ActorStore.php
+++ b/includes/user/ActorStore.php
@@ -677,8 +677,6 @@ class ActorStore implements UserIdentityLookup, ActorNormalization {
/**
* Throws an exception if the given database connection does not belong to the wiki this
* ActorStore is bound to.
- *
- * @param IReadableDatabase $db
*/
private function checkDatabaseDomain( IReadableDatabase $db ) {
$dbDomain = $db->getDomainID();
@@ -693,8 +691,6 @@ class ActorStore implements UserIdentityLookup, ActorNormalization {
/**
* In case all reasonable attempts of initializing a proper actor from the
* database have failed, entities can be attributed to special 'Unknown user' actor.
- *
- * @return UserIdentity
*/
public function getUnknownActor(): UserIdentity {
$actor = $this->getUserIdentityByName( self::UNKNOWN_USER_NAME );
@@ -748,8 +744,6 @@ class ActorStore implements UserIdentityLookup, ActorNormalization {
/**
* Emits a deprecation warning if $user does not belong to the
* same wiki this store belongs to.
- *
- * @param UserIdentity $user
*/
private function deprecateInvalidCrossWikiParam( UserIdentity $user ) {
if ( $user->getWikiId() !== $this->wikiId ) {
diff --git a/includes/user/CentralId/CentralIdLookup.php b/includes/user/CentralId/CentralIdLookup.php
index 4f05d0af4375..bdece59e9e72 100644
--- a/includes/user/CentralId/CentralIdLookup.php
+++ b/includes/user/CentralId/CentralIdLookup.php
@@ -85,11 +85,6 @@ abstract class CentralIdLookup {
$this->userFactory = $userFactory;
}
- /**
- * Get the provider id.
- *
- * @return string
- */
public function getProviderId(): string {
return $this->providerId;
}
diff --git a/includes/user/CentralId/CentralIdLookupFactory.php b/includes/user/CentralId/CentralIdLookupFactory.php
index 6224b9c6d082..8c7902815d00 100644
--- a/includes/user/CentralId/CentralIdLookupFactory.php
+++ b/includes/user/CentralId/CentralIdLookupFactory.php
@@ -79,8 +79,6 @@ class CentralIdLookupFactory {
/**
* Get the ID of the default central ID provider.
- *
- * @return string
*/
public function getDefaultProviderId(): string {
return $this->defaultProvider;
diff --git a/includes/user/Options/DefaultOptionsLookup.php b/includes/user/Options/DefaultOptionsLookup.php
index 56c3fea709fa..b4d5bd576df6 100644
--- a/includes/user/Options/DefaultOptionsLookup.php
+++ b/includes/user/Options/DefaultOptionsLookup.php
@@ -81,8 +81,6 @@ class DefaultOptionsLookup extends UserOptionsLookup {
/**
* Get default user options from $wgDefaultUserOptions (ignoring any conditional defaults)
- *
- * @return array
*/
private function getGenericDefaultOptions(): array {
if ( $this->defaultOptions !== null ) {
diff --git a/includes/user/PasswordReset.php b/includes/user/PasswordReset.php
index a30a1e193545..35fee177cbc9 100644
--- a/includes/user/PasswordReset.php
+++ b/includes/user/PasswordReset.php
@@ -148,10 +148,6 @@ class PasswordReset implements LoggerAwareInterface {
return StatusValue::newGood();
}
- /**
- * @param User $user
- * @return StatusValue
- */
private function computeIsAllowed( User $user ): StatusValue {
$enabledStatus = $this->isEnabled();
if ( !$enabledStatus->isGood() ) {
diff --git a/includes/user/TalkPageNotificationManager.php b/includes/user/TalkPageNotificationManager.php
index d6d05d2c0324..6cc7cf50ee15 100644
--- a/includes/user/TalkPageNotificationManager.php
+++ b/includes/user/TalkPageNotificationManager.php
@@ -181,7 +181,6 @@ class TalkPageNotificationManager {
/**
* Remove the new messages status
- * @param UserIdentity $user
*/
public function removeUserHasNewMessages( UserIdentity $user ): void {
if ( $this->isTalkDisabled( $user ) ) {
@@ -339,7 +338,6 @@ class TalkPageNotificationManager {
/**
* Update the user touched timestamp
- * @param UserIdentity $user
*/
private function touchUser( UserIdentity $user ) {
// Ideally this would not be in User, it would be in its own service
diff --git a/includes/user/TempUser/TempUserCreator.php b/includes/user/TempUser/TempUserCreator.php
index aec44077fab3..3bdedc772236 100644
--- a/includes/user/TempUser/TempUserCreator.php
+++ b/includes/user/TempUser/TempUserCreator.php
@@ -252,10 +252,6 @@ class TempUserCreator implements TempUserConfig {
return null;
}
- /**
- * Get the serial provider
- * @return SerialProvider
- */
private function getSerialProvider(): SerialProvider {
if ( !isset( $this->serialProvider ) ) {
$this->serialProvider = $this->createSerialProvider();
@@ -263,10 +259,6 @@ class TempUserCreator implements TempUserConfig {
return $this->serialProvider;
}
- /**
- * Create the serial provider
- * @return SerialProvider
- */
private function createSerialProvider(): SerialProvider {
$type = $this->serialProviderConfig['type'];
if ( isset( self::SERIAL_PROVIDERS[$type] ) ) {
@@ -292,10 +284,6 @@ class TempUserCreator implements TempUserConfig {
);
}
- /**
- * Get the serial mapping
- * @return SerialMapping
- */
private function getSerialMapping(): SerialMapping {
if ( !isset( $this->serialMapping ) ) {
$this->serialMapping = $this->createSerialMapping();
@@ -303,10 +291,6 @@ class TempUserCreator implements TempUserConfig {
return $this->serialMapping;
}
- /**
- * Create the serial map
- * @return SerialMapping
- */
private function createSerialMapping(): SerialMapping {
$type = $this->serialMappingConfig['type'];
if ( isset( self::SERIAL_MAPPINGS[$type] ) ) {
diff --git a/includes/user/User.php b/includes/user/User.php
index 25ee09095dca..039f02b90145 100644
--- a/includes/user/User.php
+++ b/includes/user/User.php
@@ -2239,8 +2239,6 @@ class User implements Stringable, Authority, UserIdentity, UserEmailContact {
/**
* Get the WebRequest object to use with this object
- *
- * @return WebRequest
*/
public function getRequest(): WebRequest {
return $this->mRequest ?? RequestContext::getMain()->getRequest();
@@ -3352,7 +3350,6 @@ class User implements Stringable, Authority, UserIdentity, UserEmailContact {
/**
* Returns the Authority of this User if it's the main request context user.
* This is intended to exist only for the period of transition to Authority.
- * @return UserAuthority
*/
private function getThisAsAuthority(): UserAuthority {
if ( !$this->mThisAsAuthority ) {
@@ -3381,7 +3378,6 @@ class User implements Stringable, Authority, UserIdentity, UserEmailContact {
/**
* Check whether this is the global session user.
- * @return bool
*/
private function isGlobalSessionUser(): bool {
// The session user is set up towards the end of Setup.php. Until then,
diff --git a/includes/user/UserGroupManager.php b/includes/user/UserGroupManager.php
index 24ec5156f253..ed2f1e50e41d 100644
--- a/includes/user/UserGroupManager.php
+++ b/includes/user/UserGroupManager.php
@@ -1202,8 +1202,6 @@ class UserGroupManager {
/**
* Cleans cached group memberships for a given user
- *
- * @param UserIdentity $user
*/
public function clearCache( UserIdentity $user ) {
$user->assertWiki( $this->wikiId );
diff --git a/includes/user/UserTimeCorrection.php b/includes/user/UserTimeCorrection.php
index 533b45552fa1..021224bcd152 100644
--- a/includes/user/UserTimeCorrection.php
+++ b/includes/user/UserTimeCorrection.php
@@ -129,7 +129,6 @@ class UserTimeCorrection implements Stringable {
/**
* Was the original correction specification valid
- * @return bool
*/
public function isValid(): bool {
return $this->valid;
diff --git a/includes/utils/BatchRowIterator.php b/includes/utils/BatchRowIterator.php
index c3b999cc2b44..e9eac0a0b7f2 100644
--- a/includes/utils/BatchRowIterator.php
+++ b/includes/utils/BatchRowIterator.php
@@ -198,9 +198,6 @@ class BatchRowIterator implements RecursiveIterator {
return $this->current && count( $this->current );
}
- /**
- * @return null|RecursiveIterator
- */
public function getChildren(): ?RecursiveIterator {
return new NotRecursiveIterator( new ArrayIterator( $this->current ) );
}
diff --git a/includes/utils/UrlUtils.php b/includes/utils/UrlUtils.php
index c5b84ed60c73..4a0e836e66ee 100644
--- a/includes/utils/UrlUtils.php
+++ b/includes/utils/UrlUtils.php
@@ -212,7 +212,6 @@ class UrlUtils {
/**
* Get the canonical server, i.e. the canonical protocol and host part of
* the wiki's URL.
- * @return string
*/
public function getCanonicalServer(): string {
// @phan-suppress-next-line PhanTypeMismatchReturnNullable -- throw if unconfigured
diff --git a/includes/watchlist/NoWriteWatchedItemStore.php b/includes/watchlist/NoWriteWatchedItemStore.php
index 6660c3568d9d..2d2c3db81f88 100644
--- a/includes/watchlist/NoWriteWatchedItemStore.php
+++ b/includes/watchlist/NoWriteWatchedItemStore.php
@@ -37,7 +37,6 @@ class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
/**
* Initially set WatchedItemStore that will be used in cases where writing is not needed.
- * @param WatchedItemStoreInterface $actualStore
*/
public function __construct( WatchedItemStoreInterface $actualStore ) {
$this->actualStore = $actualStore;
diff --git a/includes/watchlist/WatchedItemStore.php b/includes/watchlist/WatchedItemStore.php
index 35347409efea..701ce431ebe8 100644
--- a/includes/watchlist/WatchedItemStore.php
+++ b/includes/watchlist/WatchedItemStore.php
@@ -355,10 +355,6 @@ class WatchedItemStore implements WatchedItemStoreInterface {
return true;
}
- /**
- * @param UserIdentity $user
- * @return bool
- */
public function mustClearWatchedItemsUsingJobQueue( UserIdentity $user ): bool {
return $this->countWatchedItems( $user ) > $this->updateRowsPerQuery;
}
@@ -1504,10 +1500,6 @@ class WatchedItemStore implements WatchedItemStoreInterface {
return $cache;
}
- /**
- * @param UserIdentity $user
- * @return string
- */
private function getPageSeenTimestampsKey( UserIdentity $user ): string {
return $this->stash->makeGlobalKey(
'watchlist-recent-updates',