Skip to content

Commit 5293f30

Browse files
authored
Add T_OPEN_PARENTHESIS check back
1 parent 7f4927a commit 5293f30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ public function process(File $phpcsFile, $stackPtr)
211211
break;
212212
}
213213

214-
if (isset($tokens[$start]['parenthesis_closer']) === true) {
214+
if (isset($tokens[$start]['parenthesis_closer']) === true
215+
&& $tokens[$start]['code'] === T_OPEN_PARENTHESIS
216+
) {
215217
$start = $tokens[$start]['parenthesis_closer'];
216218
continue;
217219
}

0 commit comments

Comments
 (0)