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

Function detect

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

fileExistsMethod · 0.80
readFileMethod · 0.80
getAllFilesMethod · 0.65

Tested by

no test coverage detected