Fix PHPStan errors

MAILPOET-6318
This commit is contained in:
Oluwaseun Olorunsola
2024-11-29 11:06:30 +01:00
committed by Jan Lysý
parent 9a6225873c
commit 6df51455d2
7 changed files with 63 additions and 6 deletions

View File

@@ -134,8 +134,8 @@ class Content_Renderer_Test extends \MailPoetTest {
*/
private function getStylesValueForTag( $html, $tag ): ?string {
$html = new \WP_HTML_Tag_Processor( $html );
if ( $html->next_tag( $tag ) ) { // @phpstan-ignore-line
return $html->get_attribute( 'style' ); // @phpstan-ignore-line
if ( $html->next_tag( $tag ) ) {
return $html->get_attribute( 'style' );
}
return null;
}