Skip to content

Commit a78b21d

Browse files
sverasivaschenko
andauthored
Update Magento2/Sniffs/Legacy/LayoutSniff.php
Co-authored-by: Sergii Ivashchenko <[email protected]>
1 parent c30669f commit a78b21d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Magento2/Sniffs/Legacy/LayoutSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ private function getFormattedXML(File $phpcsFile)
271271
{
272272
$doc = new DomDocument('1.0');
273273
$doc->formatOutput = true;
274-
$doc->loadXML($phpcsFile->getTokensAsString(0, 999999));
274+
$doc->loadXML($phpcsFile->getTokensAsString(0, count($phpcsFile->getTokens())));
275275
return $doc->saveXML();
276276
}
277277

0 commit comments

Comments
 (0)