Skip to content

Commit 101618d

Browse files
authored
ENGCOM-4627: phpcs error on rule classes - must be of the type integer #22081
2 parents 7e6e098 + 8355ba6 commit 101618d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dev/tests/static/framework/Magento/Sniffs/Annotation/AnnotationFormatValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ public function validateDescriptionFormatStructure(
301301
$this->validateShortDescriptionFormat(
302302
$phpcsFile,
303303
(int) $shortPtr,
304-
$commentStartPtr,
305-
$commentEndPtr,
304+
(int)$commentStartPtr,
305+
(int)$commentEndPtr,
306306
$emptyTypeTokens
307307
);
308308
}

dev/tests/static/framework/Magento/Sniffs/Annotation/ClassAnnotationStructureSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ public function process(File $phpcsFile, $stackPtr)
9797
{
9898
$tokens = $phpcsFile->getTokens();
9999
$previousCommentClosePtr = $phpcsFile->findPrevious(T_DOC_COMMENT_CLOSE_TAG, $stackPtr - 1, 0);
100-
$this->validateAnnotationBlockExists($phpcsFile, $previousCommentClosePtr, $stackPtr);
101-
$commentStartPtr = $phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, $stackPtr - 1, 0);
100+
$this->validateAnnotationBlockExists($phpcsFile, (int)$previousCommentClosePtr, (int)$stackPtr);
101+
$commentStartPtr = (int)$phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, $stackPtr - 1, 0);
102102
$commentCloserPtr = $tokens[$commentStartPtr]['comment_closer'];
103103
$emptyTypeTokens = [
104104
T_DOC_COMMENT_WHITESPACE,
@@ -111,7 +111,7 @@ public function process(File $phpcsFile, $stackPtr)
111111
} else {
112112
$this->annotationFormatValidator->validateDescriptionFormatStructure(
113113
$phpcsFile,
114-
$commentStartPtr,
114+
(int)$commentStartPtr,
115115
(int) $shortPtr,
116116
$previousCommentClosePtr,
117117
$emptyTypeTokens

0 commit comments

Comments
 (0)