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

Inline WHILE triggers SpaceBeforeSemicolon incorrectly #2562

Closed
sybrew opened this issue Jul 21, 2019 · 1 comment · Fixed by #2563
Closed

Inline WHILE triggers SpaceBeforeSemicolon incorrectly #2562

sybrew opened this issue Jul 21, 2019 · 1 comment · Fixed by #2563

Comments

@sybrew
Copy link

sybrew commented Jul 21, 2019

Test code 1:

$level = ob_get_level();
while ( $level-- ) ob_end_clean();

Error triggered 1:

Expected 0 spaces before semicolon; 1 found
Squiz.ControlStructures.ControlSignature.SpaceBeforeSemicolon

Test code 2:

$level = ob_get_level();
while ( $level-- )
	ob_end_clean();

Error triggered 2:

Expected 0 spaces before semicolon; newline found
Squiz.ControlStructures.ControlSignature.SpaceBeforeSemicolon

Additional notes:
An inline for-loop doesn't trigger such an error.

@jrfnl
Copy link
Contributor

jrfnl commented Jul 21, 2019

Clear report. Bug confirmed. PR #2563 should fix this.

@gsherwood gsherwood added this to Backlog in PHPCS v3 Development via automation Jul 21, 2019
@gsherwood gsherwood added this to the 3.5.0 milestone Jul 21, 2019
@gsherwood gsherwood changed the title Inline "while" triggers SpaceBeforeSemicolon incorrectly Inline WHILTE triggers SpaceBeforeSemicolon incorrectly Jul 31, 2019
@gsherwood gsherwood changed the title Inline WHILTE triggers SpaceBeforeSemicolon incorrectly Inline WHILE triggers SpaceBeforeSemicolon incorrectly Jul 31, 2019
PHPCS v3 Development automation moved this from Backlog to Ready for Release Jul 31, 2019
gsherwood added a commit that referenced this issue Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
PHPCS v3 Development
Ready for Release
Development

Successfully merging a pull request may close this issue.

3 participants