pretty-php
pretty-php copied to clipboard
Review ad-hoc suppression of blank lines
-
[ ] Consider statements like these for replacement with suppression of blank lines across a range of tokens, so blank lines between adjacent comments are collapsed in the given context:
-
$token->Whitespace |= Space::NO_BLANK_... -
$items->setTokenWhitespace(Space::NO_BLANK_...)
-
-
[ ] Don't downgrade blank lines to newlines in
PreserveNewlines::maybePreserveNewlineAfter(). It would be preferable for newlines in the input to be preserved as-is, and for blank lines to be suppressed as needed, so presets and (future) third-party rules can preserve blank lines that are suppressed by default.