Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ public function process(File $phpcsFile, $stackPtr)
continue;
}

// Report, but don't auto-fix tab identation for a PHP 7.3+ flexible heredoc/nowdoc closer.
// Auto-fixing this would cause parse errors as the indentation of the heredoc/nowdoc contents
// needs to use the same type of indentation. Also see: https://3v4l.org/7OF3M .
if ($tokens[$i]['code'] === T_END_HEREDOC || $tokens[$i]['code'] === T_END_NOWDOC) {
$phpcsFile->addError($error, $i, $errorCode.'HeredocCloser');
continue;
}

$fix = $phpcsFile->addFixableError($error, $i, $errorCode);
if ($fix === true) {
if (isset($tokens[$i]['orig_content']) === true) {
Expand Down

This file was deleted.