Skip to content

Commit

Permalink
Merge pull request #254 from magento-l3/ACP2E-2674
Browse files Browse the repository at this point in the history
ACP2E-2674: [MCS] Fix duplicate "Comment block is missing"
  • Loading branch information
victor-v-rad authored Dec 4, 2023
2 parents 7aef678 + a72c166 commit 372d4c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function process(File $phpcsFile, $stackPtr)
} while ($commentEndPtr !== false && !in_array($tokens[$commentEndPtr]['code'], $tokensToFind, true));

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

Expand Down
2 changes: 2 additions & 0 deletions Magento2/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@
<exclude-pattern>*/Test/*</exclude-pattern>
<exclude-pattern>*Test.php</exclude-pattern>
<exclude-pattern>*/PHPCSUtils/*</exclude-pattern>
<!-- duplicates Magento2.Annotation.MethodAnnotationStructure.NoCommentBlock-->
<exclude name="Magento2.Annotation.MethodArguments.NoCommentBlock"/>
</rule>

<rule ref="Internal.NoCodeFound">
Expand Down

0 comments on commit 372d4c6

Please sign in to comment.