Skip to content

Commit b09b463

Browse files
committed
Stop using scope_condition for scope conditions in process
1 parent 2acd468 commit b09b463

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

VariableAnalysis/Sniffs/CodeAnalysis/VariableAnalysisSniff.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,11 @@ public function process(File $phpcsFile, $stackPtr) {
209209
$this->markAllVariablesRead($phpcsFile, $stackPtr);
210210
return;
211211
}
212-
if (isset($token['scope_condition']) && (in_array($token['code'], $scopeStartTokenTypes, true) || FunctionDeclarations::isArrowFunction($phpcsFile, $stackPtr))) {
212+
if (in_array($token['code'], $scopeStartTokenTypes, true)
213+
|| FunctionDeclarations::isArrowFunction($phpcsFile, $stackPtr)
214+
) {
213215
Helpers::debug('found scope condition', $token);
214-
$this->scopeStartIndices[] = $token['scope_condition'];
216+
$this->scopeStartIndices[] = $stackPtr;
215217
return;
216218
}
217219
}

0 commit comments

Comments
 (0)