(r: string)
| 1528 | } |
| 1529 | |
| 1530 | function 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 |
no outgoing calls
no test coverage detected