Skip to content

Commit 75f43af

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

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Magento2/Sniffs/Legacy/ModuleXMLSniff.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public function process(File $phpcsFile, $stackPtr)
3939
return;
4040
}
4141

42+
// 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.
4244
$xml = simplexml_load_string($this->getFormattedXML($phpcsFile));
4345
if ($xml === false) {
4446
$phpcsFile->addError(
@@ -97,8 +99,7 @@ private function elementIsCurrentlySniffedLine(SimpleXMLElement $element, int $s
9799
}
98100

99101
/**
100-
* We need to format the incoming XML to avoid tags split into several lines. In that case, PHP's DOMElement
101-
* returns the position of the closing /> as the position of the tag.
102+
* Format the incoming XML to avoid tags split into several lines.
102103
*
103104
* @param File $phpcsFile
104105
* @return false|string

0 commit comments

Comments
 (0)