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

Function detect

src/resolution/frameworks/codeigniter.ts:293–299  ·  view source on GitHub ↗
(context: ResolutionContext)

Source from the content-addressed store, hash-verified

291 },
292
293 detect(context: ResolutionContext): boolean {
294 if (context.fileExists('system/core/CodeIgniter.php')) return true;
295 // `system/` is often a Composer package, and `application/` can sit below the
296 // repository root. A CodeIgniter routes file names its default controller.
297 const routes = context.getAllFiles().find((file) => file.endsWith('application/config/routes.php'));
298 return routes !== undefined && /\$route\s*\[\s*['"]default_controller['"]\s*\]/.test(context.readFile(routes) ?? '');
299 },
300
301 resolve(ref: UnresolvedRef, context: ResolutionContext): ResolvedRef | null {
302 const name = ref.referenceName;

Callers

nothing calls this directly

Calls 3

fileExistsMethod · 0.80
getAllFilesMethod · 0.65
readFileMethod · 0.65

Tested by

no test coverage detected