Upgrade phan-config to 0.7.1

Change-Id: I859d81eda8601da91602b27a223b6d6d59ecf563
This commit is contained in:
Daimona Eaytoy 2019-09-01 11:23:31 +02:00
parent 25d63aa639
commit 393e47c5a7
5 changed files with 7 additions and 5 deletions

View file

@ -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": [

View file

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

View file

@ -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 = [];

View file

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

View file

@ -478,6 +478,7 @@ class SpecialAbuseLog extends AbuseFilterSpecialPage {
}
}
// @phan-suppress-next-line PhanImpossibleCondition
if ( $foundInvalid ) {
$out->addHTML(
Html::rawElement(