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
Single line conditions #2116
Comments
Hi @arnoson, thanks for reaching out about this. We chose to adhere to the PER-CS coding standard in this project as much as possible, which doesn't allow single line conditions: https://www.php-fig.org/per/coding-style/#5-control-structures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using simple conditions for early returns / guard statements the current formatting is quite verbose:
will be converted to:
It would be great if these single line conditions would be preserved. Alot of formatters for c-style languages like prettier for javascript or ClangFormat allow this, resulting in much more concise code.
The text was updated successfully, but these errors were encountered: