Skip to content

Commit 23d1e51

Browse files
committed
Fixing fatal error
When we moved off a lamba function, we haven't properly updated the $phpcsFile reference. This commit is taking advantage of `$this->currentFile` property, which holds a reference of phpcsFile
1 parent 5cb1f19 commit 23d1e51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPressVIPMinimum/Sniffs/Variables/VariableAnalysisSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ protected function processScopeClose(
14431443
}
14441444

14451445
function filter_non_whitespace_tokens($argumentPtr) {
1446-
$tokens = $phpcsFile->getTokens();
1446+
$tokens = $this->currentFile->getTokens();
14471447
return $tokens[$argumentPtr]['code'] !== T_WHITESPACE;
14481448
}
14491449
}//end class

0 commit comments

Comments
 (0)