mirror of
https://github.com/danog/psalm.git
synced 2024-12-12 01:09:38 +01:00
unused variable
This commit is contained in:
parent
afbda6d0f6
commit
966211e052
@ -191,17 +191,12 @@ class CallAnalyzer
|
||||
|| $is_final)
|
||||
) {
|
||||
$local_vars_in_scope = [];
|
||||
$local_vars_possibly_in_scope = [];
|
||||
|
||||
foreach ($context->vars_in_scope as $var_id => $type) {
|
||||
if (strpos($var_id, '$this->') === 0) {
|
||||
if ($type->initialized) {
|
||||
$local_vars_in_scope[$var_id] = $context->vars_in_scope[$var_id];
|
||||
|
||||
if (isset($context->vars_possibly_in_scope[$var_id])) {
|
||||
$local_vars_possibly_in_scope[$var_id] = $context->vars_possibly_in_scope[$var_id];
|
||||
}
|
||||
|
||||
unset($context->vars_in_scope[$var_id]);
|
||||
unset($context->vars_possibly_in_scope[$var_id]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user