From c11500100784e3cce95b681094da02065047f5ba Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 3 Jul 2023 14:19:39 +0100 Subject: [PATCH] Avoid use of constant in trait This is to support old versions of PHP. --- Magento2/Sniffs/Legacy/ParseXMLTrait.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Magento2/Sniffs/Legacy/ParseXMLTrait.php b/Magento2/Sniffs/Legacy/ParseXMLTrait.php index 10a9f95b..a81cb06f 100644 --- a/Magento2/Sniffs/Legacy/ParseXMLTrait.php +++ b/Magento2/Sniffs/Legacy/ParseXMLTrait.php @@ -13,8 +13,6 @@ trait ParseXMLTrait { - private const ERROR_CODE_XML = 'WrongXML'; - /** * Format the incoming XML to avoid tags split into several lines. * @@ -33,7 +31,7 @@ private function getFormattedXML(File $phpcsFile) $phpcsFile->addError( "Couldn't parse contents of '%s', check that they are in valid XML format.", 0, - self::ERROR_CODE_XML, + 'WrongXML', [ Common::stripBasepath($phpcsFile->getFilename(), $phpcsFile->config->basepath), ]