BUGFIX: Respect double quotes for ajax deprecation

Relates: #33
This commit is contained in:
Daniel Siepmann 2017-04-04 08:12:14 +02:00
parent aa8ffab3fa
commit 9c6085642e
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -67,7 +67,7 @@ class Typo3Update_Sniffs_Deprecated_AjaxRegistrationSniff implements PhpCsSniff
}
$tokens = $phpcsFile->getTokens();
if ($tokens[$stackPtr]['content'] !== "'AJAX'") {
if (preg_match('/"AJAX"|\'AJAX\'/', $tokens[$stackPtr]['content']) !== 1) {
return;
}
$equalSign = $phpcsFile->findNext(T_EQUAL, $stackPtr, null, false, null, true);