I'm looking for a rule that prevents empty lines after the opening brace of a class.
I found the rule Squiz.WhiteSpace.FunctionOpeningBraceSpace for functions, but I can't find any for classes.
Any suggestions are appreciated.
I'm looking for a rule that prevents empty lines after the opening brace of a class.
I found the rule Squiz.WhiteSpace.FunctionOpeningBraceSpace for functions, but I can't find any for classes.
Any suggestions are appreciated.
You are looking for no_blank_lines_after_class_opening
from FriendsOfPHP/PHP-CS-Fixer.
If you want to use CodeSniffer, you still can. With EasyCodingStandard you can use both.
# easy-coding-standard.neon
checkers:
- PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer
Do you want more? Check this short post.
© 2022 - 2024 — McMap. All rights reserved.