MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / phpWebRootsMoved

Function phpWebRootsMoved

src/resolution/php-web-root.ts:140–153  ·  view source on GitHub ↗
(before: string, now: string)

Source from the content-addressed store, hash-verified

138 * holds files the sync added, changed or removed, which it resolves anyway.
139 */
140export function phpWebRootsMoved(before: string, now: string): boolean {
141 if (before === now) return false;
142 if (before === CONFIGURED_WEB_ROOT || now === CONFIGURED_WEB_ROOT) return true;
143 let was: Record<string, unknown>;
144 let is: Record<string, unknown>;
145 try {
146 was = JSON.parse(before) as Record<string, unknown>;
147 is = JSON.parse(now) as Record<string, unknown>;
148 } catch {
149 return true;
150 }
151 if (!was || typeof was !== 'object' || !is || typeof is !== 'object') return true;
152 return Object.keys(is).some((folder) => Object.prototype.hasOwnProperty.call(was, folder) && was[folder] !== is[folder]);
153}

Callers 2

phpWebRootsMovedMethod · 0.90

Calls 2

parseMethod · 0.80
callMethod · 0.80

Tested by

no test coverage detected