Skip to content

Commit

Permalink
Catch alternative quote symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden committed Jun 26, 2023
1 parent 7ed7571 commit 51b2ac8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Magento2/Sniffs/Legacy/PhtmlTemplateSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private function checkBlockVariable(File $phpcsFile, int $stackPtr, array $token
private function checkHtml(File $phpcsFile, int $stackPtr): void
{
$content = $phpcsFile->getTokensAsString($stackPtr, 1);
$pattern = '_\s+type="text/javascript"_';
$pattern = '_\s+type=(["\'])text/javascript\1_';

if (preg_match($pattern, $content)) {
$fix = $phpcsFile->addFixableWarning(
Expand Down

0 comments on commit 51b2ac8

Please sign in to comment.