Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Sep 21, 2020
2 parents d185d58 + fd107c9 commit e8bdb51
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public function register()
public function process(File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
if (isset($tokens[($stackPtr + 2)]) === false) {
// Syntax error or live coding, bow out.
return;
}

$ignoreBefore = false;
$prev = $phpcsFile->findPrevious(Tokens::$emptyTokens, ($stackPtr - 1), null, true);
Expand Down

0 comments on commit e8bdb51

Please sign in to comment.