Add missing typehints

Change-Id: I3003d40e641b1ebfff8fd986a58cbc2c4f8f18d6
This commit is contained in:
Ed Sanders 2024-09-23 14:25:50 +01:00
parent 51381f0067
commit 48b5da806d
2 changed files with 4 additions and 4 deletions

View file

@ -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 );

View file

@ -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 );
}
}