Skip to content

Conversation

fsw
Copy link
Member

@fsw fsw commented Aug 20, 2021

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.

…laration 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.
@sivaschenko
Copy link
Member

@fsw can you please cover this case with a test?

@fsw
Copy link
Member Author

fsw commented Aug 20, 2021

@sivaschenko done. I have modified existing test case. Without the fix it hangs, with the fix it passes.

@sivaschenko
Copy link
Member

@magento import pr to magento-commerce/magento-coding-standard

@magento-engcom-team
Copy link
Contributor

@sivaschenko the pull request successfully imported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants