Skip to content

Commit ecb43cc

Browse files
authored
Merge pull request #290 from cakephp/ADmad-patch-1
Fix check for empty comment for @throws tag.
2 parents a2018f6 + a6ec617 commit ecb43cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CakePHP/Sniffs/Commenting/FunctionCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ protected function processThrows(File $phpcsFile, $stackPtr, $commentStart)
265265
if ($exception === null) {
266266
$error = 'Exception type and comment missing for @throws tag in function comment';
267267
$phpcsFile->addWarning($error, $tag, 'InvalidThrows');
268-
} elseif ($comment === null) {
268+
} elseif (empty($comment)) {
269269
$error = 'Comment missing for @throws tag in function comment';
270270
$phpcsFile->addWarning($error, $tag, 'EmptyThrows');
271271
} else {

0 commit comments

Comments
 (0)