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

Function buildPhpPropertyTypePatterns

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

Source from the content-addressed store, hash-verified

1528}
1529
1530function buildPhpPropertyTypePatterns(r: string): RegExp[] {
1531 return [
1532 new RegExp(
1533 `\\b(?:(?:private|protected|public|readonly|static|final)(?:\\(set\\))?\\s+)+\\??([A-Za-z_\\\\][\\w\\\\]*)\\s+&?\\$${r}\\b`,
1534 ), // private readonly ?Foo $prop (typed property / promoted param)
1535 new RegExp(`\\$this->${r}\\b\\s*=\\s*new\\s+([A-Za-z_\\\\][\\w\\\\]*)`), // $this->prop = new Foo()
1536 ];
1537}
1538
1539/**
1540 * 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