We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Maybe it would be a good idea in cases like this:
<?php return ob_get_clean();
to not throw AddEmptyLineBeforeReturnStatement warning and allow it?
AddEmptyLineBeforeReturnStatement
When I have this code:
wpforms-phpcs screams at me with WPForms.Formatting.EmptyLineBeforeReturn.AddEmptyLineBeforeReturnStatement.
WPForms.Formatting.EmptyLineBeforeReturn.AddEmptyLineBeforeReturnStatement
The obvious fix in this case right now is having this:
But to my eye, that looks worse and actually hurts readability.
When parsing tags check whether the previous line has a PHP opening tag, and if not - allow it being there instead of the empty line.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected Behavior
Maybe it would be a good idea in cases like this:
to not throw
AddEmptyLineBeforeReturnStatement
warning and allow it?Current Behavior
When I have this code:
wpforms-phpcs screams at me with
WPForms.Formatting.EmptyLineBeforeReturn.AddEmptyLineBeforeReturnStatement
.The obvious fix in this case right now is having this:
But to my eye, that looks worse and actually hurts readability.
Possible Solution
When parsing tags check whether the previous line has a PHP opening tag, and if not - allow it being there instead of the empty line.
The text was updated successfully, but these errors were encountered: