From 8580b73320a93d06d05c6e0262c88e68e4b9fed6 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Wed, 14 Feb 2024 21:50:42 +0100 Subject: [PATCH] build: Resolve MediaWikiNoEmptyIfDefined suppression Follow-Up: I21a5260f36c4fa0d767ec6bba86fcfa35ff0a369 Change-Id: Ib97140baf68bfcc1fae4d9506f73503307f41719 --- .phan/config.php | 3 --- src/Parsoid/Ref.php | 2 +- src/Parsoid/References.php | 2 ++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.phan/config.php b/.phan/config.php index 8b4694210..b76f66daf 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -5,9 +5,6 @@ $cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config. // Due to creation of Parser::$extCite property $cfg['suppress_issue_types'][] = 'PhanUndeclaredProperty'; -// To migrate later -$cfg['suppress_issue_types'][] = 'MediaWikiNoEmptyIfDefined'; - /** * Quick implementation of a recursive directory list. * @param string $dir The directory to list diff --git a/src/Parsoid/Ref.php b/src/Parsoid/Ref.php index 57ef3d67e..32ace4b9c 100644 --- a/src/Parsoid/Ref.php +++ b/src/Parsoid/Ref.php @@ -35,7 +35,7 @@ class Ref extends ExtensionTagHandler { // function. However, we're overly permissive here since we can't // distinguish when that's nested in another template. // The php preprocessor did our expansion. - $allowNestedRef = !empty( $extApi->inTemplate() ); + $allowNestedRef = $extApi->inTemplate(); return $extApi->extTagToDOM( $extArgs, diff --git a/src/Parsoid/References.php b/src/Parsoid/References.php index bce03f965..d6a01dc16 100644 --- a/src/Parsoid/References.php +++ b/src/Parsoid/References.php @@ -1,6 +1,8 @@