Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kukulich committed Oct 16, 2022
1 parent ac214c2 commit d4175d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -48,7 +48,7 @@ public function process(File $phpcsFile, $attributeOpenerPointer): void
}

$docCommentStartPointer = TokenHelper::findFirstTokenOnLine($phpcsFile, $docCommentOpenerPointer);
$docCommentEndPointer = TokenHelper::findFirstTokenOnNextLine($phpcsFile, $tokens[$docCommentOpenerPointer]['comment_closer']) - 1;
$docCommentEndPointer = TokenHelper::findLastTokenOnLine($phpcsFile, $tokens[$docCommentOpenerPointer]['comment_closer']);
$docComment = TokenHelper::getContent($phpcsFile, $docCommentStartPointer, $docCommentEndPointer);

$firstAttributeOpenerPointer = $attributeOpenerPointer;
Expand Down
Expand Up @@ -110,9 +110,9 @@ protected function getCondition(File $phpcsFile, int $parenthesisOpenerPointer,

protected function getLineEnd(File $phpcsFile, int $pointer): string
{
$firstPointerOnNextLine = TokenHelper::findFirstTokenOnNextLine($phpcsFile, $pointer);
$lastPointerOnLine = TokenHelper::findLastTokenOnLine($phpcsFile, $pointer);

return rtrim(TokenHelper::getContent($phpcsFile, $pointer, $firstPointerOnNextLine - 1));
return rtrim(TokenHelper::getContent($phpcsFile, $pointer, $lastPointerOnLine));
}

}

0 comments on commit d4175d8

Please sign in to comment.