(r: string)
| 1540 | } |
| 1541 | |
| 1542 | function 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 |
no outgoing calls
no test coverage detected