Skip to content

Commit

Permalink
PSR2/UseDeclaration: allow comments after the last USE statement
Browse files Browse the repository at this point in the history
  • Loading branch information
iammattcoleman committed Feb 10, 2018
1 parent eefb31c commit f147caf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function process(File $phpcsFile, $stackPtr)
return;
}

$next = $phpcsFile->findNext(T_WHITESPACE, ($end + 1), null, true);
$next = $phpcsFile->findNext(Tokens::$emptyTokens, ($end + 1), null, true);

if ($next === false || $tokens[$next]['code'] === T_CLOSE_TAG) {
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php
use Foo\Bar; //comment

// This should pass.

0 comments on commit f147caf

Please sign in to comment.