diff --git a/src/Standards/Generic/Sniffs/WhiteSpace/HereNowdocIdentifierSpacingSniff.php b/src/Standards/Generic/Sniffs/WhiteSpace/HereNowdocIdentifierSpacingSniff.php index 2296525f3f..c2939a71d9 100644 --- a/src/Standards/Generic/Sniffs/WhiteSpace/HereNowdocIdentifierSpacingSniff.php +++ b/src/Standards/Generic/Sniffs/WhiteSpace/HereNowdocIdentifierSpacingSniff.php @@ -48,9 +48,12 @@ public function process(File $phpcsFile, $stackPtr) && strpos($tokens[$stackPtr]['content'], "\t") === false ) { // Nothing to do. + $phpcsFile->recordMetric($stackPtr, 'Heredoc/nowdoc identifier', 'no space between <<< and ID'); return; } + $phpcsFile->recordMetric($stackPtr, 'Heredoc/nowdoc identifier', 'space between <<< and ID'); + $error = 'There should be no space between the <<< and the heredoc/nowdoc identifier string'; $data = [$tokens[$stackPtr]['content']];