From 5293f30ff93f5cb22ac68cf070667263115da88c Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Thu, 25 Jun 2020 12:25:17 +0200 Subject: [PATCH] Add T_OPEN_PARENTHESIS check back --- src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php b/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php index 9c3b1a63ad..343d9b29e3 100644 --- a/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php +++ b/src/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php @@ -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; }