1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Remove impossible TODO.

This commit is contained in:
AndrolGenhald 2022-01-07 17:35:17 -06:00
parent 3c7d176f87
commit bf606202f8
2 changed files with 0 additions and 13 deletions

View File

@ -70,11 +70,6 @@ class Context
/**
* A set of globals that are referenced somewhere.
* Ideally this shouldn't be needed and GlobalAnalyzer should add an edge to the
* DataFlowGraph pointing from the global to its use in another scope, but since that's
* difficult this is used as a workaround to always mark referenced globals as used.
*
* @internal May be removed if GlobalAnalyzer is improved.
*
* @var array<string, true>
*/

View File

@ -95,15 +95,7 @@ class GlobalAnalyzer
if ($statements_analyzer->data_flow_graph instanceof VariableUseGraph) {
if ($global_context !== null && $global_context->hasVariable($var_id)) {
// TODO get global CodeLocation so that global variable can be marked as unused if it is
// unused inside the function. Marking it as a referenced global causes it to be marked
// used if it's used as a global in any function, even if it's unused in that function.
$global_context->referenced_globals[$var_id] = true;
// $statements_analyzer->data_flow_graph->addPath(
// $assignment_node,
// $global_node,
// 'byref-assignment'
// );
}
}
}