diff --git a/includes/BlockedDomainFilter.php b/includes/BlockedDomainFilter.php index 4f3d8035b..368771ef3 100644 --- a/includes/BlockedDomainFilter.php +++ b/includes/BlockedDomainFilter.php @@ -59,7 +59,7 @@ class BlockedDomainFilter { * @param Title $title Title of the page that was attempted on, used for logging * @return Status Error status if it's a match, good status if not */ - public function filter( VariableHolder $vars, $user, $title ) { + public function filter( VariableHolder $vars, User $user, Title $title ) { global $wgAbuseFilterEnableBlockedExternalDomain; $status = Status::newGood(); if ( !$wgAbuseFilterEnableBlockedExternalDomain ) { @@ -122,7 +122,7 @@ class BlockedDomainFilter { * @param Title $title * @param string $blockedDomain The blocked domain the user attempted to add */ - private function logFilterHit( User $user, $title, $blockedDomain ) { + private function logFilterHit( User $user, Title $title, string $blockedDomain ) { $logEntry = new ManualLogEntry( 'abusefilterblockeddomainhit', 'hit' ); $logEntry->setPerformer( $user ); $logEntry->setTarget( $title ); diff --git a/includes/BlockedDomainStorage.php b/includes/BlockedDomainStorage.php index 2933a9557..30bc82ebc 100644 --- a/includes/BlockedDomainStorage.php +++ b/includes/BlockedDomainStorage.php @@ -259,7 +259,7 @@ class BlockedDomainStorage implements IDBAccessObject { * @param string $comment Save comment * @return RevisionRecord|null */ - private function saveContent( array $content, $user, $comment ): ?RevisionRecord { + private function saveContent( array $content, $user, string $comment ): ?RevisionRecord { $configPage = $this->getBlockedDomainPage(); $page = $this->wikiPageFactory->newFromLinkTarget( $configPage ); $updater = $page->newPageUpdater( $user ); @@ -277,7 +277,7 @@ class BlockedDomainStorage implements IDBAccessObject { /** * @return TitleValue TitleValue of the config json page */ - private function getBlockedDomainPage() { + private function getBlockedDomainPage(): TitleValue { return new TitleValue( NS_MEDIAWIKI, self::TARGET_PAGE ); } }