MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / has_dynamic_variables

Function has_dynamic_variables

src/diagnostics/undefined_variables.rs:584–591  ·  view source on GitHub ↗

Returns `true` if the statements contain variable variables (`$$x`) anywhere in the function body.

(statements: &[Statement<'_>])

Source from the content-addressed store, hash-verified

582/// Returns `true` if the statements contain variable variables (`$$x`)
583/// anywhere in the function body.
584fn has_dynamic_variables(statements: &[Statement<'_>]) -> bool {
585 for stmt in statements {
586 if stmt_has_dynamic_var(stmt) {
587 return true;
588 }
589 }
590 false
591}
592
593fn stmt_has_dynamic_var(stmt: &Statement<'_>) -> bool {
594 match stmt {

Callers 1

check_scopeFunction · 0.85

Calls 1

stmt_has_dynamic_varFunction · 0.85

Tested by

no test coverage detected