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

Squiz/ClassDeclaration: bug fix - ignore PHPCS annotation tokens #1835

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Jan 5, 2018

Treat the new // phpcs: comments in the same way as "ordinary" T_COMMENT tokens.

Includes adjusted unit test.

This fixes a bug where an error would be reported for a // phpcs: comment being on the same line as the class close brace, as well as the fixer for that error moving the // phpcs: comment, while it shouldn't.

Treat the new `// phpcs:` comments in the same way as "ordinary" `T_COMMENT` tokens.

Includes adjusted unit test.

This fixes a bug where an error would be reported for a `// phpcs:` comment being on the same line as the class close brace, as well as the fixer for that error moving the `// phpcs:` comment, while it shouldn't.
@jrfnl
Copy link
Contributor Author

jrfnl commented Jan 5, 2018

The Travis failure is unrelated to this PR. Looks like one of the builds just needs to be restarted.

@gsherwood gsherwood added this to the 3.2.3 milestone Jan 5, 2018
@gsherwood gsherwood merged commit 760dc1a into squizlabs:master Jan 5, 2018
gsherwood added a commit that referenced this pull request Jan 5, 2018
@gsherwood
Copy link
Member

👍 Thanks

@jrfnl jrfnl deleted the feature/squiz-classdeclaration-phpcs-annotations branch January 5, 2018 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants