Open
Description
Expected Behavior
Maybe it would be a good idea in cases like this:
<?php
return ob_get_clean();
to not throw AddEmptyLineBeforeReturnStatement
warning and allow it?
Current Behavior
When I have this code:
<?php
return ob_get_clean();
wpforms-phpcs screams at me with WPForms.Formatting.EmptyLineBeforeReturn.AddEmptyLineBeforeReturnStatement
.
The obvious fix in this case right now is having this:
<?php
return ob_get_clean();
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.