From a838f396a566b7e6c6dd3facab9603ee71d905af Mon Sep 17 00:00:00 2001 From: David Roe Date: Thu, 28 Sep 2023 16:17:18 +0100 Subject: [PATCH] fix: lookup variables in require/include --- internal/languages/php/analyzer/analyzer.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/languages/php/analyzer/analyzer.go b/internal/languages/php/analyzer/analyzer.go index c23cb26f5..7949b3cdd 100644 --- a/internal/languages/php/analyzer/analyzer.go +++ b/internal/languages/php/analyzer/analyzer.go @@ -45,7 +45,17 @@ func (analyzer *analyzer) Analyze(node *sitter.Node, visitChildren func() error) return analyzer.analyzeGenericConstruct(node, visitChildren) case "switch_label": return visitChildren() - case "binary_expression", "unary_op_expression", "argument", "encapsed_string", "sequence_expression", "array_element_initializer", "formal_parameters": + case "binary_expression", + "unary_op_expression", + "argument", + "encapsed_string", + "sequence_expression", + "array_element_initializer", + "formal_parameters", + "include_expression", + "include_once_expression", + "require_expression", + "require_once_expression": return analyzer.analyzeGenericOperation(node, visitChildren) case "while_statement", "do_statement", "if_statement", "expression_statement", "compound_statement": // statements don't have results return visitChildren()