Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ForbiddenEmptyListAssignment sniff (code review). #166

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Aug 14, 2016

  • Trigger error when there are only comments between the parenthesis.
  • Trigger error when there are empty parenthesis between the list parenthesis.
  • Don't trigger error for unfinished code when review is used during live coding (in an editor).
  • Slightly simplify the code.
  • Remove unnecessary sprintf().

Includes unit tests demonstrating the issue with the comments and the parenthesis.
Includes some extra unit tests for valid list assignments.

As there are now more test cases, refactored the unit tests to use data providers as well.

* Trigger error when there are only comments between the parenthesis.
* Trigger error when there are empty parenthesis between the list parenthesis.
* Don't trigger error for unfinished code when review is used during live coding (in an editor).
* Slightly simplify the code.
* Remove unnecessary `sprintf()`.

Includes unit tests demonstrating the issue with the comments.
Includes some extra unit tests for valid list assignments.

As there are now more test cases, refactored the unit tests to use data providers as well.
@wimg wimg merged commit 6eb2fdd into PHPCompatibility:master Aug 14, 2016
@jrfnl jrfnl deleted the feature/improve-empty-list-assignment-check branch August 14, 2016 13:50
@jrfnl jrfnl added this to the 7.0.3 milestone Apr 30, 2017
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.

None yet

2 participants