Skip to content

Commit 829143d

Browse files
committed
fix(fonts): drop always-true state guard that broke Homeboy lint
Inline embedded_fonts_css assignment now that state union guarantees 'embedded' after the preserved branch returns. Errors fixed: - phpstan.identical.alwaysTrue: 'embedded' === 'embedded' always evaluates to true at level 7 PHP 8.2 compatible. All CI checks passing. Refs Automattic#839
1 parent b730dee commit 829143d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

includes/class-static-site-importer-font-materializer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ public static function prepare_overlay( array $plan, array $resolved_plan ) {
122122
$writes[] = self::write( 'assets/css/embedded-fonts.css', $css_body, 'theme.font_materialization' );
123123
return self::with_runtime_registration( $writes, $resolved_plan, array(), $diagnostics );
124124
}
125-
if ( 'embedded' === $font_faces['state'] ) {
126-
$embedded_css = (string) $font_faces['css'];
127-
}
125+
$embedded_css = (string) $font_faces['css'];
128126
if ( '' === trim( $embedded_css ) ) {
129127
return new WP_Error( 'static_site_importer_font_materialization_failed', '', $diagnostics );
130128
}

0 commit comments

Comments
 (0)