Skip to content

Commit

Permalink
ENGCOM-4627: phpcs error on rule classes - must be of the type integer
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko authored Apr 8, 2019
2 parents 7e6e098 + 8355ba6 commit 101618d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ public function validateDescriptionFormatStructure(
$this->validateShortDescriptionFormat(
$phpcsFile,
(int) $shortPtr,
$commentStartPtr,
$commentEndPtr,
(int)$commentStartPtr,
(int)$commentEndPtr,
$emptyTypeTokens
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public function process(File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
$previousCommentClosePtr = $phpcsFile->findPrevious(T_DOC_COMMENT_CLOSE_TAG, $stackPtr - 1, 0);
$this->validateAnnotationBlockExists($phpcsFile, $previousCommentClosePtr, $stackPtr);
$commentStartPtr = $phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, $stackPtr - 1, 0);
$this->validateAnnotationBlockExists($phpcsFile, (int)$previousCommentClosePtr, (int)$stackPtr);
$commentStartPtr = (int)$phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, $stackPtr - 1, 0);
$commentCloserPtr = $tokens[$commentStartPtr]['comment_closer'];
$emptyTypeTokens = [
T_DOC_COMMENT_WHITESPACE,
Expand All @@ -111,7 +111,7 @@ public function process(File $phpcsFile, $stackPtr)
} else {
$this->annotationFormatValidator->validateDescriptionFormatStructure(
$phpcsFile,
$commentStartPtr,
(int)$commentStartPtr,
(int) $shortPtr,
$previousCommentClosePtr,
$emptyTypeTokens
Expand Down

0 comments on commit 101618d

Please sign in to comment.