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

Function buildPhpPropertyTypePatterns

src/resolution/name-matcher.ts:1542–1549  ·  view source on GitHub ↗
(r: string)

Source from the content-addressed store, hash-verified

1540}
1541
1542function buildPhpPropertyTypePatterns(r: string): RegExp[] {
1543 return [
1544 new RegExp(
1545 `\\b(?:(?:private|protected|public|readonly|static|final)(?:\\(set\\))?\\s+)+\\??([A-Za-z_\\\\][\\w\\\\]*)\\s+&?\\$${r}\\b`,
1546 ), // private readonly ?Foo $prop (typed property / promoted param)
1547 new RegExp(`\\$this->${r}\\b\\s*=\\s*new\\s+([A-Za-z_\\\\][\\w\\\\]*)`), // $this->prop = new Foo()
1548 ];
1549}
1550
1551/**
1552 * Second-chance typing for a PHP `$this->prop` receiver whose property

Callers 1

phpPropertyTypePatternsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected