mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
parent
ed61bcafda
commit
e22e0ac92c
@ -847,6 +847,7 @@ class AssignmentAnalyzer
|
||||
|
||||
if ($lhs_var_id) {
|
||||
$context->vars_in_scope[$lhs_var_id] = Type::getMixed();
|
||||
$context->hasVariable($lhs_var_id, $statements_analyzer);
|
||||
}
|
||||
|
||||
if ($rhs_var_id) {
|
||||
|
@ -1002,6 +1002,13 @@ class UnusedVariableTest extends TestCase
|
||||
}
|
||||
}',
|
||||
],
|
||||
'varPassedByRef' => [
|
||||
'<?php
|
||||
function foo(array $b) : void {
|
||||
$a = &$b;
|
||||
$a["foo"] = 5;
|
||||
}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user