Skip to content

Commit ddf5f72

Browse files
authored
Merge pull request #637 from PHPCSStandards/feature/generic-herenowdocidentifierspacing-add-metrics
Generic/HereNowdocIdentifierSpacing: add metrics
2 parents 6f96ad8 + 10126c7 commit ddf5f72

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Standards/Generic/Sniffs/WhiteSpace/HereNowdocIdentifierSpacingSniff.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ public function process(File $phpcsFile, $stackPtr)
4848
&& strpos($tokens[$stackPtr]['content'], "\t") === false
4949
) {
5050
// Nothing to do.
51+
$phpcsFile->recordMetric($stackPtr, 'Heredoc/nowdoc identifier', 'no space between <<< and ID');
5152
return;
5253
}
5354

55+
$phpcsFile->recordMetric($stackPtr, 'Heredoc/nowdoc identifier', 'space between <<< and ID');
56+
5457
$error = 'There should be no space between the <<< and the heredoc/nowdoc identifier string';
5558
$data = [$tokens[$stackPtr]['content']];
5659

0 commit comments

Comments
 (0)