Skip to content

Commit 372d4c6

Browse files
authored
Merge pull request #254 from magento-l3/ACP2E-2674
ACP2E-2674: [MCS] Fix duplicate "Comment block is missing"
2 parents 7aef678 + a72c166 commit 372d4c6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Magento2/Sniffs/Annotation/MethodAnnotationStructureSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function process(File $phpcsFile, $stackPtr)
7171
} while ($commentEndPtr !== false && !in_array($tokens[$commentEndPtr]['code'], $tokensToFind, true));
7272

7373
if ($commentEndPtr === false || $tokens[$commentEndPtr]['code'] !== \T_DOC_COMMENT_CLOSE_TAG) {
74-
$phpcsFile->addError('Comment block is missing', $stackPtr, 'MethodArguments');
74+
$phpcsFile->addError('Comment block is missing', $stackPtr, 'NoCommentBlock');
7575
return;
7676
}
7777

Magento2/ruleset.xml

+2
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,8 @@
758758
<exclude-pattern>*/Test/*</exclude-pattern>
759759
<exclude-pattern>*Test.php</exclude-pattern>
760760
<exclude-pattern>*/PHPCSUtils/*</exclude-pattern>
761+
<!-- duplicates Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock-->
762+
<exclude name="Magento2.Annotation.MethodArguments.NoCommentBlock"/>
761763
</rule>
762764

763765
<rule ref="Internal.NoCodeFound">

0 commit comments

Comments
 (0)