diff --git a/dev/tests/static/framework/Magento/Sniffs/Files/LineLengthSniff.php b/dev/tests/static/framework/Magento/Sniffs/Files/LineLengthSniff.php index c69f85ca8758bc3c596cddc2ea2052a24343f5aa..336f28a21eb192faa49b6e02ee54398b04a6596d 100644 --- a/dev/tests/static/framework/Magento/Sniffs/Files/LineLengthSniff.php +++ b/dev/tests/static/framework/Magento/Sniffs/Files/LineLengthSniff.php @@ -22,8 +22,8 @@ class LineLengthSniff extends \Generic_Sniffs_Files_LineLengthSniff */ protected function checkLineLength(\PHP_CodeSniffer_File $phpcsFile, $stackPtr, $lineContent) { - $previousLineRegexp = '~__\($|Phrase\($~'; - $currentLineRegexp = '~__\(.+\)|Phrase\(.+\)~'; + $previousLineRegexp = '~__\($|\bPhrase\($~'; + $currentLineRegexp = '~__\(.+\)|\bPhrase\(.+\)~'; $currentLineMatch = preg_match($currentLineRegexp, $lineContent) !== 0; $previousLineMatch = preg_match($previousLineRegexp, $this->previousLineContent) !== 0; $this->previousLineContent = $lineContent; diff --git a/setup/src/Magento/Setup/Module/I18n/Dictionary/Phrase.php b/setup/src/Magento/Setup/Module/I18n/Dictionary/Phrase.php index 1c7347f28928e295a030e4fdc5b13df109f1ca28..d914b63ffcd05a6bd574682d54b9c7efdc4ffcb1 100644 --- a/setup/src/Magento/Setup/Module/I18n/Dictionary/Phrase.php +++ b/setup/src/Magento/Setup/Module/I18n/Dictionary/Phrase.php @@ -259,12 +259,10 @@ class Phrase } /** - * Compile PHP string based on quotes type it enclosed with + * Compile PHP string (escaping unescaped quotes and processing concatenation) * * @param string $string * @return string - * - * @SuppressWarnings(PHPMD.EvalExpression) */ private function getCompiledString($string) {