Commit 1f7fb8a
committed
CodeAnalysis/ConstructorDestructorReturn: correctly ignore PHP-4-style constructors in namespaced classes
Methods with the same name as a class are not recognized as PHP4-style constructors in namespaced classes.
This was so far not taken into account in this sniff, leading to false positives.
A better solution, with a lower performance impact is expected at a later point in time (namespace tracker), however, as my time is limited, it may still be a while before that solution is available.
In the mean time, let's just fix it.
Includes test.1 parent f8b1620 commit 1f7fb8a
File tree
2 files changed
+26
-0
lines changed- Universal
- Sniffs/CodeAnalysis
- Tests/CodeAnalysis
2 files changed
+26
-0
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
108 | 120 | | |
109 | 121 | | |
110 | 122 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments