Commit c9c072f
authored
Prevent ImportsFromTestNamespaceSniff from hanging when group use declaration has trailing coma.
If a grouped use statement has a trailing coma like this:
```
use Magento\Something{
Foo,
Bar,
};
```
`findNext` on line 59 was returning false and next call was starting to search again from line 1 (`$next + 1`) and this function was looping indefinitely through input tokens.1 parent 2e163ba commit c9c072f
1 file changed
+7
-5
lines changedLines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
0 commit comments