* 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)
| 3534 | * php-web-root.ts), else null. |
| 3535 | */ |
| 3536 | phpWebRootOf(fromFile: string): string | null { |
| 3537 | const configured = loadWebRoot(this.projectRoot); |
| 3538 | if (configured !== null) return configured; |
| 3539 | return this.inferredPhpWebRoots().get(folderOf(fromFile)) ?? null; |
| 3540 | } |
| 3541 | |
| 3542 | /** Every folder holding a `$_SERVER['DOCUMENT_ROOT']` include → the web root inferred for it, read once a pass. */ |
| 3543 | private inferredPhpWebRoots(): Map<string, string | null> { |
no test coverage detected