Skip to content

Commit 51b2ac8

Browse files
committed
Catch alternative quote symbols
1 parent 7ed7571 commit 51b2ac8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Magento2/Sniffs/Legacy/PhtmlTemplateSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private function checkBlockVariable(File $phpcsFile, int $stackPtr, array $token
7474
private function checkHtml(File $phpcsFile, int $stackPtr): void
7575
{
7676
$content = $phpcsFile->getTokensAsString($stackPtr, 1);
77-
$pattern = '_\s+type="text/javascript"_';
77+
$pattern = '_\s+type=(["\'])text/javascript\1_';
7878

7979
if (preg_match($pattern, $content)) {
8080
$fix = $phpcsFile->addFixableWarning(

0 commit comments

Comments
 (0)