build: Resolve MediaWikiNoEmptyIfDefined suppression

Follow-Up: I7b9a7e20a5d177edfcba3c76a0d65228497e0d79
Change-Id: I3d468497b53fce67d643d0961fe3659e739def71
This commit is contained in:
Umherirrender 2024-02-14 22:04:53 +01:00
parent 5831b9dd60
commit abbac13038
2 changed files with 2 additions and 5 deletions

View file

@ -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'],
[

View file

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