Fix and enable 1 PHPCS exclusion

Change-Id: Iee1fb7c926b301a9980e8f1d2b447fb6ef169c6e
This commit is contained in:
Reedy 2022-04-08 14:10:31 +01:00
parent 6829b5410c
commit 7a67ab0a5d
2 changed files with 7 additions and 5 deletions

View file

@ -3,7 +3,6 @@
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
<rule ref="MediaWiki.NamingConventions.ValidGlobalName">
<properties>

View file

@ -88,7 +88,8 @@ class SpamBlacklist extends BaseBlacklist {
}
} elseif ( $mode === 'stash' ) {
if ( $knownNonMatchAsOf && ( time() - $knownNonMatchAsOf ) < self::STASH_AGE_DYING ) {
return false; // OK; not about to expire soon
// OK; not about to expire soon
return false;
}
}
@ -147,7 +148,7 @@ class SpamBlacklist extends BaseBlacklist {
$imploded = implode( ' ', $fullUrls[0] );
wfDebugLog( 'SpamBlacklistHit', "$ip caught submitting spam: $imploded\n" );
if ( !$preventLog && $title ) {
$this->logFilterHit( $user, $title, $imploded ); // Log it
$this->logFilterHit( $user, $title, $imploded );
}
if ( $retVal === false ) {
$retVal = [];
@ -195,7 +196,8 @@ class SpamBlacklist extends BaseBlacklist {
return $dbr->selectFieldValues(
'externallinks',
'el_to',
[ 'el_from' => $title->getArticleID() ], // should be zero queries
// should be zero queries
[ 'el_from' => $title->getArticleID() ],
$fname
);
}
@ -207,7 +209,8 @@ class SpamBlacklist extends BaseBlacklist {
$entries,
$title,
$user,
true /* no logging */,
// no logging
true,
'stash'
);
}