-
Notifications
You must be signed in to change notification settings - Fork 1
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
else if
restyles with undesirable nesting
#4
Comments
Absolutely it should -- and the test case for that passes (cf. tests/Examples/if.php). Can you send along your code snippet where it does not? |
Oh wait I see what you're saying -- the space between |
This probably cannot be fixed in the Styler -- the trouble originates in the Parser. The underlying PHP-Parser nodes, from which PHP-Styler builds the presentations, do not recognize <?php
if (1) {
// foo
} else if (1) {
// bar
} ... you will see that the the I can imagine doing something in the Styler that would visit the underlying The correct fix would be for PHP-Parser to recognize In any case, thank you for the report, and I'm sorry I can't make a good fix in a timely manner. |
php-styler restyles code using
else if
:...to this:
I think the styled code should use
elseif
instead.The text was updated successfully, but these errors were encountered: