* The folder `$_SERVER['DOCUMENT_ROOT']` names for a PHP include in * `fromFile` (#3298): the project's `codegraph.json` `webRoot`, else the one * the project's own includes agree on for the file's folder (see * php-web-root.ts), else null.
(fromFile: string)
| 3606 | * php-web-root.ts), else null. |
| 3607 | */ |
| 3608 | phpWebRootOf(fromFile: string): string | null { |
| 3609 | const configured = loadWebRoot(this.projectRoot); |
| 3610 | if (configured !== null) return configured; |
| 3611 | return this.inferredPhpWebRoots().get(folderOf(fromFile)) ?? null; |
| 3612 | } |
| 3613 | |
| 3614 | /** Every folder holding a `$_SERVER['DOCUMENT_ROOT']` include → the web root inferred for it, read once a pass. */ |
| 3615 | private inferredPhpWebRoots(): Map<string, string | null> { |
no test coverage detected