diff --git a/.phan/config.php b/.phan/config.php index 89ad7658f..662bd1f31 100644 --- a/.phan/config.php +++ b/.phan/config.php @@ -2,9 +2,6 @@ $cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php'; -// To migrate later -$cfg['suppress_issue_types'][] = 'MediaWikiNoEmptyIfDefined'; - $cfg['directory_list'] = array_merge( $cfg['directory_list'], [ diff --git a/src/WikiTexVC/MMLmappings/Util/MMLParsingUtil.php b/src/WikiTexVC/MMLmappings/Util/MMLParsingUtil.php index d29dfe226..b02b0b9fe 100644 --- a/src/WikiTexVC/MMLmappings/Util/MMLParsingUtil.php +++ b/src/WikiTexVC/MMLmappings/Util/MMLParsingUtil.php @@ -204,7 +204,7 @@ class MMLParsingUtil { * @return string MML with added attributes */ public static function forgeIntentToTopElement( string $renderedMML, $intentContentAtr ) { - if ( empty( $intentContentAtr ) || empty( $renderedMML ) ) { + if ( !$intentContentAtr || !$renderedMML ) { return $renderedMML; } @@ -251,7 +251,7 @@ class MMLParsingUtil { } public static function forgeIntentToSpecificElement( string $renderedMML, $intentContentAtr, string $elementTag ) { - if ( empty( $intentContentAtr ) || empty( $renderedMML ) || empty( $elementTag ) ) { + if ( !$intentContentAtr || !$renderedMML || !$elementTag ) { return $renderedMML; } return self::addAttributesToMML( $elementTag, $intentContentAtr, $elementTag, true );