Skip to content

Commit

Permalink
Add T_OPEN_CURLY_BRACKET check back
Browse files Browse the repository at this point in the history
  • Loading branch information
thiemowmde authored Jun 17, 2020
1 parent 3b9282a commit 7f4927a
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 @@ -216,7 +216,9 @@ public function process(File $phpcsFile, $stackPtr)
continue;
}

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

0 comments on commit 7f4927a

Please sign in to comment.