Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function process(File $phpcsFile, $stackPtr)
// If the next non-whitespace token after this token
// is not an opening parenthesis then it is not a function call.
$openBracket = $phpcsFile->findNext(Tokens::$emptyTokens, ($stackPtr + 1), null, true);
if ($openBracket === false) {
if ($openBracket === false || $tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ $foo-> /* comment */ define('bar');
$foo?->
// phpcs:ignore Stnd.Cat.SniffName -- for reasons.
define('bar');

const DEFINE = 'value';