From 9c6085642e6d8233c25adad06ae27c9c7584656a Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 4 Apr 2017 08:12:14 +0200 Subject: [PATCH] BUGFIX: Respect double quotes for ajax deprecation Relates: #33 --- .../Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php b/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php index 355e408..14574ac 100644 --- a/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php @@ -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);