Skip to content

Commit d4175d8

Browse files
committed
Cleanup
1 parent ac214c2 commit d4175d8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

SlevomatCodingStandard/Sniffs/Attributes/RequireAttributeAfterDocCommentSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function process(File $phpcsFile, $attributeOpenerPointer): void
4848
}
4949

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

5454
$firstAttributeOpenerPointer = $attributeOpenerPointer;

SlevomatCodingStandard/Sniffs/ControlStructures/AbstractLineCondition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ protected function getCondition(File $phpcsFile, int $parenthesisOpenerPointer,
110110

111111
protected function getLineEnd(File $phpcsFile, int $pointer): string
112112
{
113-
$firstPointerOnNextLine = TokenHelper::findFirstTokenOnNextLine($phpcsFile, $pointer);
113+
$lastPointerOnLine = TokenHelper::findLastTokenOnLine($phpcsFile, $pointer);
114114

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

118118
}

0 commit comments

Comments
 (0)