Skip to content

Commit

Permalink
SlevomatCodingStandard.Functions.RequireTrailingCommaInCall: Skip ins…
Browse files Browse the repository at this point in the history
…tances on same line as closing parenthesis
  • Loading branch information
donatj authored and kukulich committed Dec 6, 2021
1 parent 4c6eee4 commit b574727
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function process(File $phpcsFile, $parenthesisOpenerPointer): void
return;
}

if ($pointerBeforeParenthesisCloser + 1 === $parenthesisCloserPointer) {
if ($tokens[$parenthesisCloserPointer]['line'] === $tokens[$pointerBeforeParenthesisCloser]['line']) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,10 @@ public function __construct(
doSomething([
$a,
]);

doSomething( $a,
$b );

doSomething( doSomething(
$foo,
) );

0 comments on commit b574727

Please sign in to comment.