mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 13:46:48 +00:00
Add missing typehints
Change-Id: I3003d40e641b1ebfff8fd986a58cbc2c4f8f18d6
This commit is contained in:
parent
51381f0067
commit
48b5da806d
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue