Skip to content

Commit d0fe150

Browse files
committed
AC-659: Create phpcs static check for ModuleXMLTest
1 parent 75f43af commit d0fe150

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Magento2/Sniffs/Legacy/ModuleXMLSniff.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public function process(File $phpcsFile, $stackPtr)
4040
}
4141

4242
// We need to format the incoming XML to avoid tags split into several lines. In that case, PHP's DOMElement
43-
// returns the position of the closing /> as the position of the tag.
43+
// returns the position of the closing /> as the position of the tag, and we need the position of <module
44+
// instead, as it is the one we compare with $stackPtr later on.
4445
$xml = simplexml_load_string($this->getFormattedXML($phpcsFile));
4546
if ($xml === false) {
4647
$phpcsFile->addError(

0 commit comments

Comments
 (0)