Skip to content

Commit

Permalink
Add T_OPEN_PARENTHESIS check back
Browse files Browse the repository at this point in the history
  • Loading branch information
thiemowmde authored Jun 25, 2020
1 parent 7f4927a commit 5293f30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ public function process(File $phpcsFile, $stackPtr)
break;
}

if (isset($tokens[$start]['parenthesis_closer']) === true) {
if (isset($tokens[$start]['parenthesis_closer']) === true
&& $tokens[$start]['code'] === T_OPEN_PARENTHESIS
) {
$start = $tokens[$start]['parenthesis_closer'];
continue;
}
Expand Down

0 comments on commit 5293f30

Please sign in to comment.