The below minimal test case:
<?php
<<<TXT
'\n'
TXT;
Provides the error Incorrect heredoc indentation PHP(PHP2016) [Ln 3, Col 1] in the console, but the code is valid PHP / hasn't got any errors. Changing the \n to anything other than \r (which also replicates the issue) causes the error to disappear, as does removing the indentation.