feat: Add complete PHP language support with trait handling and property extraction
Addresses PHP traits extracted as classes, missing class properties, skipped constants, and invisible trait usage. Adds classifyClassNode to distinguish traits from classes, fixes property extraction for PHP's property_element AST structure (added 4,366 field nodes), and adds visitNode hook for class constants and trait use declarations (increased trait edges from 636 to 1,514). Also improves Liquid schema name handling and file path reference resolution. Verified against Laravel codebase.
This commit is contained in:
@@ -369,6 +369,13 @@ export class ReferenceResolver {
|
||||
if (this.knownNames.has(receiver) || this.knownNames.has(member)) return true;
|
||||
}
|
||||
|
||||
// For path-like references (e.g., "snippets/drawer-menu.liquid"), check the filename
|
||||
const slashIdx = name.lastIndexOf('/');
|
||||
if (slashIdx > 0) {
|
||||
const fileName = name.substring(slashIdx + 1);
|
||||
if (this.knownNames.has(fileName)) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user