mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 13:46:48 +00:00
Upgrade phan-config to 0.7.1
Change-Id: I859d81eda8601da91602b27a223b6d6d59ecf563
This commit is contained in:
parent
25d63aa639
commit
393e47c5a7
|
@ -13,7 +13,7 @@
|
|||
"mediawiki/mediawiki-codesniffer": "26.0.0",
|
||||
"jakub-onderka/php-console-highlighter": "0.3.2",
|
||||
"mediawiki/minus-x": "0.3.2",
|
||||
"mediawiki/mediawiki-phan-config": "0.6.1"
|
||||
"mediawiki/mediawiki-phan-config": "0.7.1"
|
||||
},
|
||||
"scripts": {
|
||||
"fix": [
|
||||
|
|
|
@ -175,6 +175,7 @@ class AFComputedVariable {
|
|||
|
||||
if ( !Hooks::run( 'AbuseFilter-interceptVariable',
|
||||
[ $this->mMethod, $vars, $parameters, &$result ] ) ) {
|
||||
// @phan-suppress-next-line PhanImpossibleCondition False positive due to hook reference
|
||||
return $result instanceof AFPData
|
||||
? $result : AFPData::newFromPHPVar( $result );
|
||||
}
|
||||
|
|
|
@ -580,7 +580,7 @@ class AbuseFilter {
|
|||
|
||||
/**
|
||||
* @param string[] $filters
|
||||
* @return array[]
|
||||
* @return array[][]
|
||||
*/
|
||||
public static function getConsequencesForFilters( $filters ) {
|
||||
$globalFilters = [];
|
||||
|
@ -620,7 +620,7 @@ class AbuseFilter {
|
|||
* @param IDatabase $dbr
|
||||
* @param string[] $filters
|
||||
* @param string $prefix
|
||||
* @return array[]
|
||||
* @return array[][]
|
||||
*/
|
||||
public static function loadConsequencesFromDB( IDatabase $dbr, $filters, $prefix = '' ) {
|
||||
$actionsByFilter = [];
|
||||
|
|
|
@ -160,7 +160,7 @@ class AbuseFilterHooks {
|
|||
AFComputedVariable::$articleCache[$articleCacheKey] = $page;
|
||||
|
||||
// Don't trigger for null edits.
|
||||
if ( $content && $oldContent ) {
|
||||
if ( $oldContent ) {
|
||||
// Compare Content objects if available
|
||||
if ( $content->equals( $oldContent ) ) {
|
||||
return null;
|
||||
|
@ -327,7 +327,7 @@ class AbuseFilterHooks {
|
|||
$flags, Revision $revision, Status $status, $baseRevId
|
||||
) {
|
||||
$curTitle = $wikiPage->getTitle()->getPrefixedText();
|
||||
if ( !isset( AbuseFilter::$logIds[ $curTitle ] ) || !$revision ||
|
||||
if ( !isset( AbuseFilter::$logIds[ $curTitle ] ) ||
|
||||
$wikiPage !== self::$lastEditPage
|
||||
) {
|
||||
// This isn't the edit AbuseFilter::$logIds was set for
|
||||
|
|
|
@ -478,6 +478,7 @@ class SpecialAbuseLog extends AbuseFilterSpecialPage {
|
|||
}
|
||||
}
|
||||
|
||||
// @phan-suppress-next-line PhanImpossibleCondition
|
||||
if ( $foundInvalid ) {
|
||||
$out->addHTML(
|
||||
Html::rawElement(
|
||||
|
|
Loading…
Reference in a new issue