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
Blank lines around enum cases #6214
Comments
In my view, Aside, I wish they hadn't reused |
@SpacePossum what do you think? |
Any progress on this one? |
Similar issue here with CS fixer v3.8.0: enum UserMessageSeverity: int
{
case INFO = 1;
case WARNING = 2;
case ERROR = 3;
public function compareTo(UserMessageSeverity $other): int
{
return $this->value <=> $other->value;
}
} CS fixer does not add any space between cases for me, but does annoyingly remove the blank line before the function. |
Any update on this? Or a temporary workaround? 😄 |
+1 This is driving me nuts. It's removing blank lines around all the cases. |
I keep all my enums in a single directory and exclude it from the fixer conf: // .php-cs-fixer.dist.php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->exclude(['Enums']) // exclude directories named "Enums"
; Definitely not ideal, but at least I'm free to add empty lines wherever I want to. |
if some of you have time to test and/or review #6426 it will be much appreciated |
Bug report
@PhpCsFixer
Code snippet that reproduces the problem
This is fixes to:
Applied fixers are
no_extra_blank_lines
andblank_line_before_statement
.I would expect no changes instead.
The text was updated successfully, but these errors were encountered: