Commit 4e96193
PHP 8.0 | Squiz/ObjectInstantiation: prevent false positives on match/fn expressions
This change ensures that when `new Class` is returned by a match control structure or an arrow function, the sniff will not throw a false positive.
Includes unit tests.1 parent 4fa1d88 commit 4e96193
File tree
2 files changed
+13
-0
lines changed- src/Standards/Squiz
- Sniffs/Objects
- Tests/Objects
2 files changed
+13
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
16 | 27 | | |
17 | 28 | | |
0 commit comments