mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
unused param
This commit is contained in:
parent
c0f6474bc6
commit
4481428f97
@ -100,8 +100,7 @@ class BitwiseNotAnalyzer
|
||||
private static function addDataFlow(
|
||||
StatementsAnalyzer $statements_analyzer,
|
||||
PhpParser\Node\Expr $stmt,
|
||||
PhpParser\Node\Expr $value,
|
||||
string $type = 'bitwisenot'
|
||||
PhpParser\Node\Expr $value
|
||||
): void {
|
||||
$result_type = $statements_analyzer->node_data->getType($stmt);
|
||||
if ($statements_analyzer->data_flow_graph instanceof VariableUseGraph && $result_type) {
|
||||
@ -109,7 +108,7 @@ class BitwiseNotAnalyzer
|
||||
|
||||
$stmt_value_type = $statements_analyzer->node_data->getType($value);
|
||||
|
||||
$new_parent_node = DataFlowNode::getForAssignment($type, $var_location);
|
||||
$new_parent_node = DataFlowNode::getForAssignment('bitwisenot', $var_location);
|
||||
$statements_analyzer->data_flow_graph->addNode($new_parent_node);
|
||||
$result_type->parent_nodes = [
|
||||
$new_parent_node->id => $new_parent_node,
|
||||
@ -117,7 +116,7 @@ class BitwiseNotAnalyzer
|
||||
|
||||
if ($stmt_value_type && $stmt_value_type->parent_nodes) {
|
||||
foreach ($stmt_value_type->parent_nodes as $parent_node) {
|
||||
$statements_analyzer->data_flow_graph->addPath($parent_node, $new_parent_node, $type);
|
||||
$statements_analyzer->data_flow_graph->addPath($parent_node, $new_parent_node, 'bitwisenot');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user