From a72c1665e06a864dd1092342b178f71e454af48e Mon Sep 17 00:00:00 2001 From: soumah Date: Mon, 4 Dec 2023 11:28:59 -0600 Subject: [PATCH] ACP2E-2674: [MCS] Fix duplicate "Comment block is missing" --- Magento2/Sniffs/Annotation/MethodAnnotationStructureSniff.php | 2 +- Magento2/ruleset.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Magento2/Sniffs/Annotation/MethodAnnotationStructureSniff.php b/Magento2/Sniffs/Annotation/MethodAnnotationStructureSniff.php index f4250a17..a76240c7 100644 --- a/Magento2/Sniffs/Annotation/MethodAnnotationStructureSniff.php +++ b/Magento2/Sniffs/Annotation/MethodAnnotationStructureSniff.php @@ -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; } diff --git a/Magento2/ruleset.xml b/Magento2/ruleset.xml index 0090ed94..4ac058c0 100644 --- a/Magento2/ruleset.xml +++ b/Magento2/ruleset.xml @@ -758,6 +758,8 @@ */Test/* *Test.php */PHPCSUtils/* + +