Skip to content

Commit

Permalink
Merge branch 'feature/psr12-controlstructurespacing-allow-fix-comment…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Jan 8, 2020
2 parents 787b92f + 7aec50f commit 66bbdd8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function process(File $phpcsFile, $stackPtr)
for ($i = $parenOpener; $i < $parenCloser; $i++) {
if ($tokens[$i]['column'] !== 1
|| $tokens[($i + 1)]['line'] > $tokens[$i]['line']
|| isset(Tokens::$commentTokens[$tokens[$i]['code']]) === true
) {
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,14 @@ EOD
) {
return;
}

if (
isset($foo) === true
&& $bar > $foo
/*
* A multi-line comment.
*/
&& $foo === true
) {
break;
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,14 @@ EOD
) {
return;
}

if (
isset($foo) === true
&& $bar > $foo
/*
* A multi-line comment.
*/
&& $foo === true
) {
break;
}

0 comments on commit 66bbdd8

Please sign in to comment.