Skip to content

Commit 5e40039

Browse files
Use placeholder in message
1 parent f87d421 commit 5e40039

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function process(File $phpcsFile, $stackPtr)
112112
}
113113
} else if (in_array($methodName, $this->commentProhibitedFunctions, true) === true) {
114114
// Method prohibited to have docblock.
115-
$fix = $phpcsFile->addFixableError("It's forbidden to document $methodName function", $stackPtr, 'DocProhibited');
115+
$fix = $phpcsFile->addFixableError("It's forbidden to document %s function", $stackPtr, 'ForbiddenFunction', [$methodName]);
116116
if ($fix === true) {
117117
for ($i = $tokens[$commentEnd]['comment_opener']; $i <= $commentEnd; $i++) {
118118
$phpcsFile->fixer->replaceToken($i, '');

0 commit comments

Comments
 (0)