(filePath: string, content: string)
| 823 | }, |
| 824 | |
| 825 | extract(filePath: string, content: string): { nodes: Node[]; references: UnresolvedRef[] } { |
| 826 | if (filePath.endsWith('.routing.yml')) { |
| 827 | return extractDrupalRoutes(filePath, content); |
| 828 | } |
| 829 | |
| 830 | if (filePath.endsWith('.services.yml')) { |
| 831 | return extractDrupalServices(filePath, content); |
| 832 | } |
| 833 | |
| 834 | if (isDrupalHookFile(filePath) || filePath.endsWith('.php')) { |
| 835 | const hooks = extractDrupalHooks(filePath, content); |
| 836 | const declarations = content.includes('#[') ? attributedDeclarations(content) : []; |
| 837 | const plugins = extractDrupalPlugins(filePath, content, declarations); |
| 838 | return { |
| 839 | nodes: plugins.nodes, |
| 840 | references: [...hooks.references, ...oopHookReferences(filePath, content, declarations), ...plugins.references], |
| 841 | }; |
| 842 | } |
| 843 | |
| 844 | return { nodes: [], references: [] }; |
| 845 | }, |
| 846 | }; |
nothing calls this directly
no test coverage detected